Forum Discussion
Color Individual rows in Power BI matrix
How do I change the color of a matrix row in Power BI Desktop (matrix visualization) ? Similar to Excel. I want let's say 2nd ,3rd rows to have colors.
I tried to figure out for an hour but couldn't help it.
13 Replies
- Phil_SeamarkMicrosoft Employee
Hi Anonymous
Have you played with this property of the Matrix?
- AnonymousNot applicable
Hi Phil_Seamark. This does color the matrix. But I am specifically looking to color only the rows of my interest. I still cannot do that with this option.
Example:
There are 50 rows in the matrix and I just want to highlight 10th and 23rd rows. In this scenario this doesn't work.
- v-ljerr-msftMicrosoft Employee
- AnonymousNot applicable
Is there any update on this question ? I want same output
- AnonymousNot applicable
Is there any update on this question ? I want same output
- KNPSuper User
I'm not sure replying to a post from 2017 is going to get you the best answer but I'll post this here in case it helps.
The basic pattern I follow is...
Create a measure with your rules that defines the colour you want. (adjust to suit your data)
Colour = VAR v = SELECTEDVALUE ( 'Table'[Column1] ) RETURN SWITCH ( TRUE (), v = "a", "rgba(255,100,10,1)", v = "b", "rgba(10,10,255,1)", v = "g", "rgba(10,255,10,1)", v = "r", "rgba(255,10,10,1)" )Right click on the value/measure in the fields of your matrix and select 'Conditional Formatting' >> 'Background Colour' (or whichever formatting option you want).
Choose field value and your colour measure.
Hope this helps.
- AnonymousNot applicable
Hi KNP
Thanks for your quick reponse
The requirement is I have to show color coding( Conditional Formatting) for the Single row where I have dates ( in row section ).Here the logic is the row (say project) which has the dates less than current date I have to show RED color .
Power bi facilitates Conditional Formatting only for the values section.
So I want color code for the sinle row in row section.
Thank You KNP