Skip to main content Skip to complementary content
Close announcements banner

Creating a master measure with a common aggregation function

When you are working with an app, you can create master measures so that they can be reused. You can easily create a measure using one of the most common aggregation functions by selecting the function and the field from drop-down lists.

When naming an entity, avoid assigning the same name to more than one field, variable, or measure. There is a strict order of precedence for resolving conflicts between entities with identical names. This order is reflected in any objects or contexts in which these entities are used. This order of precedence is as follows:

  • Inside an aggregation, a field has precedence over a variable. Measure labels are not relevant in aggregations and are not prioritized.

  • Outside an aggregation, a measure label has precedence over a variable, which in turn has precedence over a field name.

  • Additionally, outside an aggregation, a measure can be re-used by referencing its label, unless the label is in fact a calculated one. In that situation, the measure drops in significance in order to reduce risk of self-reference, and in this case the name will always be interpreted first as a measure label, second as a field name, and third as a variable name.

  1. Click Edit Edit sheet in the toolbar.

    The assets panel opens on the left-hand side.

  2. Click Master items.

  3. After Measures, click Create new.

  4. Click Expression in the Expression field to open the Add expression dialog.

    You find drop-down lists for selecting a field and a common function on the right-hand side.

  5. If you want to show fields from a particular table, select this table in the top drop-down list (optional).
  6. Select a field from the Field drop-down list.
  7. Select a function from the bottom drop-down list.

    Tip noteYou can insert just a field by not selecting a function.
  8. Click Insert to insert the field and the function into the expression editor.

    Tip noteYou can open the online help with the full description of how to use the current function by double-clicking the function name in the expression editor and pressing Ctrl+H on the keyboard. This feature becomes available after having entered the first parenthesis of the expression after the function name, and only when using a computer with a keyboard.
  9. Click Apply to close the Add expression dialog.

    Now you need to add some descriptive data for the measure.

  10. Type a name for the measure.

  11. Type a description for the measure (optional).

    If you do not add a description and then link a glossary term to your master item as a definition, the term definition will be used in the description.

  12. If you want to specify a color, click Arrow down in the color drop down and select a color through one of the following methods:

    • Click one of the colors in the palette.
    • Type a 6 character color code in the Hex input field.
    • Click Show options at the bottom of the dialog, select a color in the color wheel, and optionally adjust the saturation slider.
  13. Add tags (optional).

  14. Optionally, if you have access to a glossary, link the measure to a glossary term.

    Linking terms to master items

  15. Under Number formatting, you can choose:

    • Auto
    • Number
    • Money
    • Date
    • Duration
    • Custom
    • Measure expression

  16. Click Create.

The measure is now saved in the Measures category in the master items, and you can use it in visualizations.

Learn more

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!