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
hidenseek9
Post Patron
Post Patron

Switch True DAX to select data to show

Hello Power BI Community, 

 

I would like to use Switch True DAX to select metric to show the necessary data depending on the needs.

For instance, if a user selects "Sales", the dashboard will show the sales data

and if the user selects "Costs", the dashboard will show the cost data. 

 

Please refer to below YouTube video and this is exactly what I would like to do.

Switch True Measure Video 

 

I understand how to set up Switch True DAX from this video, but what I do not understand is 

how this guy set up [metrics selected] measure. 

2020-02-15 04_14_26-Window.png

 

Can anyone guess how to set up this measure?

 

Thanks,

H

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@hidenseek9 

 

Refer to these posts.

 

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/m-p/500...

 

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

View solution in original post

2 REPLIES 2
VasTg
Memorable Member
Memorable Member

@hidenseek9 

 

Refer to these posts.

 

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/m-p/500...

 

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn
VasTg
Memorable Member
Memorable Member

@hidenseek9 

 

Create a table as below with values as Sales, Costs, etc and use them as a slicer. 

 

 

Sales

Costs

 

In your switch measure, use a variable to get the selected value and use in place of "Metric Selected"

 

Var selected_value = SELECTEDVALUE(COLUMN)  //Slicer column)

 

 

If it helps mark it as a solution

Kudos are nice too

Connect on LinkedIn

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