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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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