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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AAAAAAA
Regular Visitor

Auto toggle stacked column colors

Hey there, 

Is it possible to have all columns from each of the "Actual" values only display 2 colors? Projected will always be static and it's fine to always be blue. For actuals though, each section of each column is defined by what the purchase was (laptop, cell phone, ect). Right now we've got all kinds of colors for each new text entry. Ideally we could, for example, have light and dark green only in the actual columns.

Because the data is always a unique line of text, I'm struggling to understand how to make Power BI stagger light and dark green so no two actual purchases share the same shade of color. 

Thanks in advance!

 

AAAAAAA_0-1657807857107.png

 

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @AAAAAAA 

 

It seems there are many values in your legend field. Is Purchase type used on the legend? If you want to display only 2 colors for each actual column, what do these two colors represent for? 

 

If your data is similar to below, 

vjingzhang_0-1658308295999.png

You can make a stacked colum chart like below, which has only two colors because it has only two values (Cell phone & Laptop) in the legend. 

vjingzhang_1-1658308325836.png

 

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

Hey v-jingzhang,

Thank you for this input and sorry for replying so late! 

In your example, if we added one more entry to 61701 Actual [1000 | Desktop | 61701 | Actual] (for example). There would be a new part of the stack added ontop of the dark blue laptop section. I believe we could manually change the color so it matches the light blue of cell phone below, and that would be the desired aesthetic. A two toned bar that alternates color as more entries are added to it. 

That manual process though of going into the legend and telling "Desktop" to match the light blue of cell phone, so that every entry is an alternating color in relation to the entry below- Is there a way to make that happen automatically?

Thank you!


amitchandak
Super User
Super User

@AAAAAAA , In stacked visual, color is by legend not by measure, and we can not control that by measure.

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! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.