Adding Calculated Fields to Analyses
You can create calculated fields that transform your data with mathematical operations
and different types of functions. The calculated fields that you add to a dataset
in an analysis are available only in that analysis.
- Click , the Dashboards tab.
- Click Dashboard Designer, in the bottom-left corner.
- On the Analyses dialog, click , the Options button, next to an analysis and select Edit.
- On the analysis page, click , the Datasets button, on the toolbar to display the Data panel.
- In the Data panel, click the + CALCULATED FIELD button.
- In the Add calculated field dialog, create a calculation using the available data fields, parameters, operators,
and functions.
- To add a function, expand the Functions section and double-click the function that you want to use.The available functions are grouped into categories: All, Aggregate, Conditional, Date, Numeric, String, and Table Calculation. You can click a function in the list to see the function description and the required syntax.
- To add a data field, expand the Fields section and double-click the field that you want to include in the formula.
- To add an operator, enter a supported operator directly in the editor.You can also use arithmetic operators to add, subtract, multiply, or divide the values in the data fields without selecting a function. For example, the formula
{Printed Pages}*{Printed Copies}
multiplies the number of printed pages by the number of printed copies. - To add the current value of a parameter, expand the Parameters section and double-click one of the available parameters.Parameters without a default value cannot be included in calculated fields.
Make sure that you enter all the required parts of the formula according to the function syntax or the sequence of operations. For more information on the supported operators and functions, see Supported Operators and Functions.To specify the level of granularity for calculations, you can use level-aware calculations (LAC). For more information, see Level-Aware Calculations.
- To add a function, expand the Functions section and double-click the function that you want to use.
- Enter a name for the calculated field at the top of the dialog.
- Click Save.If there are errors in your formula, the editor displays an error message. Check the formula for a red line, and then hover your cursor over the line to see the error message. Common errors include missing punctuation, missing parameters, misspellings, and invalid data types.
The calculated field that you created is added to the list of fields available in the Data panel. An icon with an equal sign () is displayed next to calculated fields.
To edit or delete a calculated field, click , the Options button, next to the field and select Edit calculated field or Remove calculated field.