Create a table calculation

You can use table calculations to create ad hoc metrics.

Prerequisites:

The Table Calculation option is not enabled until fields have been selected in the Edit Tile dialog box and the Run button has been clicked to run an Explore query.

Text calculations can be used to perform mathematical, logical, text-based, and date-based calculations on the dimensions, measures, and other table calculations in your query. Table calculations uses expressions that are similar to formulas in spreadsheet tools.

Table calculations operate on the results from your query after it has run. They cannot be used to filter or exclude data which is returned from the data source.

  1. In an existing dashboard, click Dashboard actions > Edit dashboard.
  2. On the Dashboard Toolbar, select Add > Visualization and select the dataset in the Choose an Explore dialog.
  3. Add at least one field to your tile. Additional calculation types are available when you include a numeric field.
  4. In the Custom Fields section, click Add > Table Calculation.
    Result: The Create table calculation dialog appears.
  5. To create a custom expression:
    1. In the Calculation drop-down list, select Custom Expression.
    2. In the Expression text box, enter the expressions to create your calculation.
      For more information on defining custom expressions, see Creating expressions and Functions and operators.
      Note: You can only create table calculations from fields in the Explore data table.
  6. To use a shortcut calculation:
    1. In the Calculation drop-down list, select the appropriate shortcut calculation option.
    2. In the Source Column drop-down list, select the field to apply the table calculation to.
  7. Optional: Use the Format drop-down list to choose a predefined format or create a custom format.
  8. Optional: In the Name field, rename your table calculation from the default name.
  9. Select +Add Description to add an optional description of up to 255 characters to provide information about the table calculation.
  10. Click Save.
    Result: The new calculation will automatically appear in the data table.