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.
Considerations
When working with master measures, consider the following:
-
If 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.
Master measure formatting
Zahlenformatierung, Farbe und Beschriftung können für eine Master-Kennzahl konfiguriert werden. Diese Eigenschaften werden nicht auf eine Visualisierung angewendet, wenn Sie die Master-Kennzahl mithilfe einer Formel referenzieren. Um diese Eigenschaften in einer Visualisierung anzuwenden, erstellen Sie einen direkten Link zu der Master-Kennzahl, wenn Sie die Visualisierung konfigurieren.
Gehen Sie folgendermaßen vor:
-
Erweitern Sie im Eigenschaftsfenster Daten > Kennzahlen.
-
Klicken Sie auf Hinzufügen.
-
Wählen Sie im Dropdown-Menü unter Kennzahlen die Master-Kennzahl aus.
Jetzt wird ein direkter Link zur Master-Kennzahl erstellt.
Example: Using a master measure in an expression
This example creates a master measure, and then uses the master measure in a chart expression.
-
Create the master measure.
- Click Master items in the assets panel.
-
Under Measures, click Create new.
-
In the Create new measure dialog box, enter a Name for the master measure, and then click to open the Expression editor.
-
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.
-
In the Create new measure dialog box, click Create.
The new master measure is created.
- Use the master measure in a chart expression.
Add a KPI chart to a sheet in an app.
Click Add measure, and then click to open the Expression editor for the KPI.
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.
Close the Expression editor to view the KPI. You can change properties for the KPI, including the label, in the properties panel.