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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AGCL
Frequent Visitor

SWITCH Measure

Hello community,

 

I'm in a hardship while trying to use the SWITCH function to make my chart figure out a dynamic legend and colors.

 

As you can see here, I have a legend that interpret my data with two different metrics :

 

AGCL_0-1665686683609.png

 

So when I use the slicer to filter it I would like to the filtered data to return 2 different colors and to show on the legend as well, the other possibility that I have right now is to remove the legend and return all the different data with a singular color, however, when I use the slicer all the legend remains at he chart :

 

Captura de tela 2022-10-13 155051.png

Could you enlighten me how I can proper use the SWITCH measure in this case ? Other solutions are very welcome as well.

Thank you in advance

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @AGCL 

 

Sample data:

vzhangti_0-1665732271611.png

Is this the result you expect?

vzhangti_1-1665732309450.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Technically yes, however, I would like to keep my slicer with the main specification while it brings forth the two different data and interpret them as two different for the same main think.

 

Exemple : Dell - I can have data with 2 Dell different notebooks, but they are still Dell, so when I slice Dell they are suppose to appear at the chart with two different colors and legends

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.