The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
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.
ProductRank = RANKX(ALL(Table[Product]), Table[Sales], , DESC, DENSE)
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.