Creating Calculated Data Items

About Calculated Data Items

The explorer enables you to calculate new data items from your existing data items by using an expression.
Note: All calculations are performed on unaggregated data. The calculation expression is evaluated for each row in the data source before aggregations are performed. To perform calculations on aggregated data, see Creating Aggregated Measures.
In addition to performing mathematical calculations on numeric values, you can use calculated data items to create character values and date and time values. For example, if your data contains separate categories for month, day, and year, then you can calculate a date value from each category.

Create a Calculated Data Item

Here are the steps to create a calculated data item:
  1. Select Datathen selectNew Calculated Item. The New Calculated Item window appears.
  2. Enter a Name for the calculated data item.
  3. Select the data type for the calculated data item from the Result type drop-down list.
    Note: The data type is updated automatically based on the outermost operator of your expression.
  4. Build the expression for your calculated data item by dragging and dropping data items, global parameters, and operators onto the expression in the right pane. For each field in the expression, you can insert a data item, a global parameter, an operator, or a specific value.
    Note: You can double-click a data item in the Data Items pane to add it to the first available parameter in the expression.
    Note: Aggregated data items and derived data items are not supported for calculation expressions.
    When you drag and drop data items, global parameters, and operators onto the expression, the precise location of the cursor determines where and how the new element is added to the expression. As you drag the new element over the expression, a preview appears, which displays how the expression would change if you drop the element at the current location.
    For example, if your current expression is ( Profit / Revenue ), and you drag the x - y (subtract) operator over the open parenthesis symbol, then the expression changes to ( [number] – ( Profit / Revenue )). If you drag the operator over the division symbol, then the expression changes to ( Profit – Revenue ).
    There are a large number of operator types available to perform mathematical functions, process datetime values, and evaluate logical processing such as IF clauses. See Operators for Data Expressions.
    Note: You can also edit your expression as text. See Editing a Data Expression in Text Mode.
  5. When you are finished creating your expression, select the Default aggregation for the calculated data item, and then click Select to choose the data format.
  6. Click Preview to see a preview of the calculated data item as a table. The table displays the values of the calculated item and any data items that are part of the calculation expression.
  7. Click OK to create the new calculated data item. The new data item appears in the Data Items pane.
Last updated: January 8, 2019