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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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