Using Calculated Fields in a Report Matrix

Last Updated: 08/12/2016 Introduced in Verision: 2.0

Calculated Fields transform the values of other fields to create entirely new values.  Report Matrices display a count of how many records match each value reported in a column or calculated column.  Each column is referred to as a dimension.  Multiple dimensions can be compared along the x and y axes of the report matrix.

To use calculated fields in a report matrix, create the calculated field in the Report Designer, select the Matrix option, and add the calculated column as a dimension to the x or y axis.

Example

The goal of this example is to:

  1. Create a report with a calculated column.
  2. Add a matrix to the report that uses the calculated column as a dimension.
  3. Run the report to view the matrix.

To begin, navigate to a Design Folder.  Select the Create Report button and select Create Report.

createReport                       

In the resulting New Report window, give the new report a name and click Ok.

nameReport 

Next, define the data source for the report by dragging Folder Data Source to the Source list from the Data Sources > Common Data Source category in the Toolbox Panel.

dragFolderDataSource 

Next, add the Respect Permission Filter to the Filters section by dragging it from the Data Filters in the Toolbox panel. 

RespectPermissionsFilter 

Now, expand the Folder Data Sources and drag the columns Entity Name, Folder Type Name, and Nesting Level to the workspace. 

 addColumns

Expand the Calculated Columns category and drag the TruncateTextInlineField option into the workspace.

TruncateTextInlineField 

In the resulting Property Grid pop-up window, configure the calculated column.  This column will display the truncated value of another column.  For this example, configure the column to display the first three letters of the Folder Type Name column.  Select Folder Type Name in the Field drop down list and type “3” in the Limit field.  Click Ok to finish the calculated column.

configureCalcField 

The new calculated column, truncate_text_inline_field, appears in the workspace.

 newColumnAppears

To add a Matrix option to the menu bar, click on Add in the Views section, then select Matrix

selectMatrix 

This will add a Matrix option to the view menu bar.  This Matrix view will automatically open.

 matrixViewOpens

To build the report matrix, select the Matrix option.  Select the Add Dimension link corresponding to the y-axis and select Add Field Dimension.

 addFieldDimension

In the Edit pop-up, select Folder Type Name in the Field drop down list and click Ok.

 selectFolderTypeName

To add a second dimension, in the Edit pop-up window, select truncate_text_inline_field in the Field drop down list and click Ok.

addCalcDimension 

To add a third dimension, select the Add Dimension link corresponding to the x-axis and select Add Field Dimension.

addX-axisDimension 

In the Edit pop-up window, select Nesting Level in the Field drop down list and click Ok.

 selectNestingLevel

The final product should look like this.  Now, save the report and close the Report Designer

finalMatrix

 

Back in the portal, select the report and in its Action menu, select Run Report.

runReport 

The report will appear in a new window.  All of the columns, including the calculated column, will be displayed under the Data icon.

runningReport 

Select the Matrix icon to see the report matrix.

clickMatrixViewToView

 

Additional Resources