Create a Reusable Calculation in a Workbook

You can create a data element based on a calculation, and then add the data element to your workbook's visualizations. For example, you create a calculation called "SOME_NAME" and use the BIN function to classify AGE values into four buckets: 0 to 20, 21 to 40, 41 to 60, and 60 plus. You then add it to a visualization to group and display the number of product orders.

Calculated data elements are stored in the dataset’s My Calculations folder and not in the workbook. Workbooks have a My Calculations folder for each dataset used (whether joined or not-joined). Calculations are available anytime you use the workbook.

When you're writing a new calculation, you can drag and drop columns from the Data Panel into the Expression Editor. You can only drag and drop columns that are joined to the dataset.

  1. On the Home page, hover over a workbook, click Actions, and then select Open.
  2. In the Data Panel, click AddClick the Add icon to create a calculation., and select Create Calculation to open the New Calculation dialog.

  3. Enter a name.
  4. Optional: Enter a description that displays in the tooltip when you hover over a calculation.
  5. In the expression builder pane, compose and edit an expression.
    Tip: Start typing the name of a data element, function, or calculation to see a popup of the item that you can click to add to your expression.
  6. Click Validate.
  7. Click Save.