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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
I_LOVE_POWER_BI
Helper III
Helper III

How to keep the colors in the legend using a line chart with small multiples and one without

Hi guys, 

 

This problem I believe is per design, or it is a bug - not sure, however it causes me some trouble. 

 

My problem: In one very report page, I have a line chart with small multiples AND another line chart without. The small multiple line chart for the detailed breakdown and the one without for the average over all multiples as a sort of summary. So far so good.

 

Now, I am using exactly the same column for the legend in both line charts. BUT, in both visualizations the automatic color setting is different, which of course is very confusing for end users. Here an example:

 

I_LOVE_POWER_BI_0-1623139614413.png

The country is the legend in both charts, however, due to the "Region" multiple split, the colors are different. This is just an artificial example, in reality there are far too many items to finger pick the colors by hand.

 

I can understand that the color setting changes somehow through the additional breakdown, however it doesn't make any sense to me. Any idea how to get where I want to go?

 

Thanks!

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @I_LOVE_POWER_BI 

I think you problem is that the legend colors in two line charts are different, one use small multiple function and one not. I build a sample to have a test.

1.png

It seems to work well in my side. 

2.png

If you add values in legend, Power BI will show visuals in different colors by group. So I think there may be something confused Power BI to group the same legend into different groups when you use small multiple function.

Please check your data model, make sure all countries are in the correct region and just in one region. I found if I put Malaysia into two regions. I can reproduce your problem.

1.png

My result:

2.png

And you can check the verison of your Power BI Desktop, download the latest version and try again.

Or you can change the Data color in visual format to let them show the same colors in two visuals.

3.png

Best Regards,

Rico Zhou

 

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

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @I_LOVE_POWER_BI 

I think you problem is that the legend colors in two line charts are different, one use small multiple function and one not. I build a sample to have a test.

1.png

It seems to work well in my side. 

2.png

If you add values in legend, Power BI will show visuals in different colors by group. So I think there may be something confused Power BI to group the same legend into different groups when you use small multiple function.

Please check your data model, make sure all countries are in the correct region and just in one region. I found if I put Malaysia into two regions. I can reproduce your problem.

1.png

My result:

2.png

And you can check the verison of your Power BI Desktop, download the latest version and try again.

Or you can change the Data color in visual format to let them show the same colors in two visuals.

3.png

Best Regards,

Rico Zhou

 

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

 

amitchandak
Super User
Super User

@I_LOVE_POWER_BI , Actually conditional formatting is not supported with legends otherwise we can force conditional formatting

 

Please log an idea - https://ideas.powerbi.com/ideas/

 

How to do conditional formatting by measure and apply it on pie and line ?: https://youtu.be/RqBb5eBf_I4

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.