Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello All,
I have a requirement to select a value and based on the selection the visual needs to switch between 2 measures
Parameter options :- (Approved, Saved) needs to be a slicer I have 2 measures show_ext_end show_ext_%
Now I need to create a measure to switch between these 2 measures based on parameter slicer Exp = if(parameter = "approved" , "show_ext_end" , "show_ext%")
Greetings @Anonymous,
I used a slicer in that same way, only I used the SWITCH function instead of if/then and it worked for me:
https://learn.microsoft.com/en-us/dax/switch-function-dax
I made the following measure then assigned the slicer.
Parameter_Select =
SUMX (
VALUES ( 'Sort_Parameters'[Parameter] ),
SWITCH (
'Sort_Parameters'[Parameter],
"Parameter1", [Measure1],
"Parameter2", [Measure2],
"Parameter3", [Measure3],
"Parameter4", [Measure4]
)
)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 26 | |
| 23 | |
| 19 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 43 | |
| 35 | |
| 31 |