Forum Discussion
How to display different measures using a selector
- 9 years ago
I've managed to acheive this using a measure table.
Download the following PBIX file
https://1drv.ms/u/s!AtDlC2rep7a-jkiRG_LyHcv0RSXI
You'll notice on the 2nd page called 'All Sorts' you can choose different Measure names from the box in the top left and it works.
I create a static table called [Dynamic] that carries measures and then reference them in a calculated measure on the fly
You need to do the following:
1. Create a table called "Measures" with 2 columns
- Column 1 = MeasureName
- Column 2 = MeasureID
You will fill up column 1 with the names of the measures you wish to show (i.e. transactions, revenue, etc.)
Column 2 is just an index (1,2,3,etc.)
MeasureName | MeasureID
Transactions | 1
Revenue | 2
etc.
2. Create a measure with the following syntax:
DisplayMeasure = SWITCH( TRUE(), MIN ( Measures[MeasureID] ) = 1, [Transactions Measure], MIN ( Measures[MeasureID ) = 2, [Revenue Measure] )
Expand this as neccessary.
Now create a slicer with Measure table column MeasureName .
In the chart or table , use the measure DisplayMeasure as your values field, and when you select the slicer, the chart will display the appropriate measure.
This is perfect. Worked just fine.