Forum Discussion
Visualization - Matrix - change background color based upon specifc columns
- 8 months ago
Assume your value measure is:
[Sales] = SUM(Fact[Sales])Create a rank measure (ranks products within the current Store column):
Rank in Store = RANKX( ALLSELECTED(Products[Product]), [Sales], , DESC, Dense )Now create a color measure:
Top 3 Color = VAR r = [Rank in Store] RETURN SWITCH( TRUE(), r = 1, "#C6EFCE", -- green r = 2, "#FFEB9C", -- yellow r = 3, "#F8CBAD", -- red BLANK() )Apply it:
Select the Matrix
In the Values field dropdown (the measure you’re coloring) → Conditional formatting → Background color
Format by: Field value
Based on field: [Top 3 Color]
- 8 months ago
or as a measure
Hi jerryr0125 ,
Thank you lbendlin for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.
Hi jerryr0125 ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.