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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mm_bi
Frequent Visitor

Static Color in Stacked Column Chart Based on Rank

Hello Power BI Community,

I’m working on a stacked column chart and facing a challenge with the color scheme. My goal is to assign static colors to the top three products based on their rank, rather than the product itself. This is to ensure that the colors remain consistent and visually coherent, especially when filtering through long product lists which often results in a mismatched color palette.

 

Currently, the colors are tied to the products, but I want them to be associated with the rank (1st, 2nd, and 3rd place), so that the top three products always display the same colors regardless of which products they are.

 

I understand that Power BI does not offer conditional formatting options for stacked column charts. Therefore, I’m looking for a workaround or a solution that could help me achieve this static color assignment based on the product ranks.

 

Has anyone encountered a similar issue or does anyone have a solution for this? Any guidance or suggestions would be greatly appreciated.

 

Thank you in advance for your help!

Maike

 

2024-07-19 11_12_10-Stacked Column Chart - Static Color for Top 3.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi, To assign static colors to the top three products based on rank in a stacked column chart, you can create a calculated column to determine the rank and then use conditional formatting.

 

  1. Create a Rank Column:

   ProductRank = RANKX(ALL(Table[Product]), Table[Sales], , DESC, DENSE)

 

  1. Use Conditional Formatting:

   Go to the Data Colors section in the Visualizations pane, and set rules based on the ‘ProductRank’ column. Assign specific colors to ranks 1, 2, and 3.

 

This approach ensures that the top three products always have consistent colors.

Hi chiru_kudupudi,

Unfortunately, this won't solve the problem because there is no option for conditional formatting in stacked columns charts.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors