Skip to main content Skip to complementary content

Using master measures in expressions

You can use master measures in expressions. You can use the master measure by itself, or use it to build a more complex expression.

When you type in the Expression editor, an auto-complete list of matching master measures opens.

Master measure in Expression editor
Master measure in expression editor.

Information noteIf the master measure is renamed or deleted, references in expressions are not automatically updated. The old reference will return NULL in the expression as there is no measure by that name.

Example: Using a master measure in an expression

This example creates a master measure, and then uses the master measure in a chart expression.

  1. Create the master measure.

    1. Click Master items in the assets panel.
    2. Under Measures, click Create new.

      Create new measure button
      Create new measure button.

    3. In the Create new measure dialog box, enter a Name for the master measure, and then click Expression to open the Expression editor.

      Create new measure dialog box
      Create new measure window.

    4. In the Expression editor, create the expression.

      You can type the expression, or use the options available in the expression builder panel. For more information, see Working with the expression editor.

      Insert the expression using the expression builder Count(distinct item), and then click Apply.

      Add expression in Expression editor
      Add expression window.

    5. In the Create new measure dialog box, click Create.

      Create measure
      Create measure.

      The new master measure is created.

      New master measure
      Create variable for master measure.

  2. Use the master measure in a chart expression.
    1. Add a KPI chart to a sheet in an app.

      New KPI
      New KPI.

    2. Click Add measure, and then click Expression to open the Expression editor for the KPI.

      Open Expression editor
      Open expression editor.

    3. Type the master measure into the expression. As you type, you will get an auto-complete list of any available master measures. If required, the master measure can be used to build more complex expressions in the Expression editor.

      Add expression for KPI
      Create variable for master measure.

    4. Close the Expression editor to view the KPI. You can change properties for the KPI, including the label, in the properties panel.

      Master measure in KPI
      Create variable for master measure.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!