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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

filtering

Hi.
I have a table with 6 metrics which I want to visualize using bar charts. (say Metric1 - Metric6)
Those columns have numeric values.

Can I make a selection filter so that the user decides to see only one metric at a time.
For instance, user decides to visualize Metric2 variable by selecting Metric2 from some drop-down filter.

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable


Hi.
Those 6 metrics are not in the same column.
I was able to solve by using the unpivot option and creating 2 new columns, one stores the specific metric and the other its value. From there I could easily use it as a filter.

I guess the switch function works as well but I haven't tried it out.
Thank you

View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

See if this thread helps:

https://community.powerbi.com/t5/Desktop/Multiple-Measures-Slicer/m-p/2124649#M785791 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Are these 6 metric values in the same column? If they are in the same column, you can put metric name column into a slicer and set this slicer to single-select mode. Then this slicer can filter the bar chart. 

 

If they are not in the same column, you can use SWITCH to create a measure to get the result according to the selected metric in the slicer. You can also create 6 measures to get 6 metric values separately and use SWITCH to create a 7th measure to decide which measure to be evaluated. 

 

If you already have six measures for metrics, you can also use SWITCH function for it, just like the measure slicer method in Amit's reply.

 

If these are not what you want, please provide some sample data and expected output so that we can find an appropriate approach to it. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Anonymous
Not applicable


Hi.
Those 6 metrics are not in the same column.
I was able to solve by using the unpivot option and creating 2 new columns, one stores the specific metric and the other its value. From there I could easily use it as a filter.

I guess the switch function works as well but I haven't tried it out.
Thank you
amitchandak
Super User
Super User

@Anonymous , Measure slicer or calculation groups can help

 

measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.