Skip to main content
Calculated measures are custom measures, often derived from existing measures stored in the cube. They can be created on the server, or in the UI. New calculated measures can either be saved on the cube or created in the scope of a single widget. This page covers the measures saved on the cube. Save a measure on the cube when several widgets, dashboards or users need it: its expression is then defined once, which keeps it easy to maintain and to evolve. For an ad hoc formula that only makes sense in one widget, or that should stay invisible to the other users of the cube, see add a calculation to a widget. Saved calculated measures are accessible from the Measures section of the data model, they can be recognized by the fx icon before their name. They can be added to a widget in exactly the same way as other measures, see add fields to a widget. Calculated measures created and saved with Atoti UI are usable in Excel.
To be able to create or modify calculated measures within the application, you must have the canUseCalculatedMeasures permission.

Create a calculated measure

To create a new calculated measure from the UI:
  • In the data model, in the header of the Measures section, click the fx + button. This will open the Create a calculated measure popover.
  • Enter a name for your calculated measure in the text box.
  • Just below, you will see several buttons, each representing a different type of calculated measure. Click one of these buttons to add a template to the MDX editor below.
  • A hint is displayed above the MDX editor telling you what is needed to complete the template, depending on which type of calculated measure you have chosen. Click a measure and/or hierarchy from the data model, to add them into the template.
  • Alternatively, you can use the MDX editor to type or paste your own calculated measure expression.
  • Click Save and apply when you are happy with the calculated measure expression and it will be saved to the cube as well as be added to the widget.
  • Alternatively, you can click on Save and the calculated measure definition will be saved to the cube but not added to the widget.
  • The saved calculated measure will now appear directly in the Data model, and can be added to any widget.
Calculated measures can also be added to a widget by modifying the MDX query directly using the Query tab, if it is included in your application.
Click the green or red arrow buttons on the bottom left of the popover to increase or decrease the number of decimal places that will be displayed for your new calculated measure by default. Toggle the ”%” button to choose whether or not the value is displayed as a percentage.The format of the value can be changed from the Style tab after creation, for an individual widget.

Edit a calculated measure

To edit a calculated measure:
  • You can right-click on the measure in the Data model and select Edit {measure name}.
  • Use the MDX editor to make any changes to the calculated measure expression, then click Save.

Rename a calculated measure

To rename a calculated measure:
  • In the data model, right-click the name of the calculated measure to open the context menu.
  • Select Edit {measure name}.
  • Change the name in the top input box under Calculated measure name.
Saved calculated measures cannot be renamed for individual widgets, they can only be renamed globally from the data model.
Renaming a saved calculated measure will cause errors in dashboards where a widget refers to this calculated measure.

Delete a saved calculated measure

  • In the data model, right-click the name of the calculated measure to open the context menu.
  • Select Delete {measure name}.
  • A popconfirm will apppear asking if you want to continue, if you do, click Delete.
Deleting a saved calculated measure will cause errors in dashboards where a widget refers to this calculated measure.
To define a measure on a single widget instead of on the cube, see add a calculation to a widget.