Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rasalaprashanth
Frequent Visitor

Using Parameters as Slicer switch between measures

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%")

1 REPLY 1
WBarberena
Frequent Visitor

Greetings @rasalaprashanth,

 

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]

)

)

 
I had multiple measures that I needed to sort, so I put them in the 'Parameter_Select' table. You may or may not need to use SUMX.
 
Hope this helps.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors