Use the Custom Function dialog box to insert standard and custom mathematical (numeric) functions when you add a total in the Results Section.
Custom functions in the Results section involve only the data in your Results set. Apply the custom functions that you use to aggregated values. Aggregation means that data is grouped and summarized by subjecting the data to some mathematical operation, such as:
Sum
Average
Maximum
Minimum
Count
The result is a summary of the data at a higher level.
When you insert a mathematical expression at the total level, the total must be aggregated. For example, write: Sum(Units) * 5 instead of: Units * 5.
You can also use the Custom Function dialog box to calculate multiple column totals on the same rows since by default Interactive Reporting staggers columns totals.
To apply a custom function:
Access the Custom dialog box by doing one of the following:
Select a numeric column and choose Results, then Break Total. In the Insert Break Total dialog box, select Other from the Break Total Function drop-down list.
Select a numeric column and choose Results, then Grand Total. In the Insert Grand Total dialog box, select Other from the Grand Total Function drop-down list.
Select a numeric column and click the Grand Total button on the Standard Toolbar. Interactive Reporting displays the total in a new row at the bottom of the selected column. Double-click either the row cell for the total, or double-click another column of numeric values.
If you double-clicked a total, the Modify Total Function dialog box is displayed. In the Modify Total Function dialog box, select Other from the Grand Total Function drop-down list.
In the Custom Function dialog box, enter the desired expression and click OK.
The expression must consist of a mathematical operation (aggregate value), the name of the numeric values column, and if applicable, any JavaScript operators.
Note: | The Custom Function dialog box accepts any expressions built with JavaScript. |