This short guide explains how you can use slicers to select different measures. For example how to use slicers to switch between a percentage of total, YTD or actual vs realisation measure.
Create the measure names in a table
Firstly you’ll need a table with the measure names. There are multiple ways to go about it. You could load it from en external source, create a table and enter values manually or create a table using DAX. This mainly depends on your preference, but as long as it is a single column containing the measure names, you are good to go. After you have created the names, you can create a slicer and add in the column.
Create the Dynamic Measure
Secondly, create a measure that responds to the selected measure name in the slicer.
Measure Selection = SWITCH( TRUE(), VALUES('Measure Dimensions'[Measure]) = "First measure name", [First measure], VALUES('Measure Dimensions'[Measure]) = " Second measure name ", [Second measure], VALUES('Measure Dimensions'[Measure]) = " Third measure name ", [Third measure], BLANK())
2. (Optional)Capture the Value selected in the Slicer
A nice feature is to display whatever the user selected. Use the following DAX in a card visual to achive this.
User Selection = SELECTEDVALUE('Slicer Table'[Value])