Introduction
Switching the active measure (KPI) in one or more visualizations allows users to analyze data from different perspectives using the same dashboard and to drill down on KPIs.
The document will describe how to build a solution that allows end-users to change the active measure in visualizations.
β
Semantic Layer- create the measures
In the semantic layer, we'll create a few measures to support the use case
Create the two measures to be displayed in the chart.
Create a measure that only includes a parameter.
βCreate a Conditional measure and use the three measures from the previous steps.
The measure should look like this:
β
Workbook
Define Variables
In the workbook, create two new variables.
Define Actions
Open the Action editor and create a new action block.
The Action block will track changes in the "Selected Measure" variable
And change the value of the numeric variable accordingly.Build Visualizations
Create a visualization using the conditional measure created in the semantic layer section.
In the measure settings:Build a Control to Change the Active Measure
Test
Preview the app and change the value in the drop-down list to test the solution.
β
β
Drive alternate measures & dimensions using variables & dropdowns
A new, fast approach to choosing dimensions, measures and columns, without relying on actions. Charts that share measures/dimensions can use a single dropdown.
How it works (simple)
Create a variable (e.g. Selected Measure)
We recommend creating another variable to list all options (e.g. All measures), to ensure users have an up-to-date list of all available options
Use Visibility conditions on measures or dimensions
Each item listens to the same variable value
Change the dropdown β charts update instantly












