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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nkasdali
Microsoft Employee
Microsoft Employee

Conditional formatting for Rows

Hi All,

 

Any tips to change the background color of my rows in a matrix depending values ?

 

regards

1 ACCEPTED SOLUTION

Hi, @nkasdali 

Please check the link down below.

I am not sure whether I understood your request correctly, but I created a ranking measure for <segment ranking by sales> for country & product.

And I put this measure into the background conditional formatting option pane.

 

Picture1.png

 

https://www.dropbox.com/s/nh5dev64dy84v52/CF%20rows2.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM



Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



View solution in original post

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi, @nkasdali 

I am not sure if I understood your question correctly, but in some cases, row-based conditional formatting is possible in a matrix visualization, by creating a rankx measure and use it as a conditional formatting measure. 

If it is OK with you, please share your sample pbix file's link here, then I can try to look into it to come up with a relevant solution.

 

Thanks.

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM



Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



@Jihwan_Kim here a pbix file PBIX files  thanks

Capture d’écran 2021-04-29 165944.png

Hi, @nkasdali 

Could you please tell me whether your problem has been solved?

If yes, you could accept the helpful answer as solution. You could also share your own solution here.
For now, there is no content of description in the thread. If you still need help, please share more details to us.

Best Regards,
Community Support Team _ Eason

Hi, @nkasdali 

Please check the link down below.

I am not sure whether I understood your request correctly, but I created a ranking measure for <segment ranking by sales> for country & product.

And I put this measure into the background conditional formatting option pane.

 

Picture1.png

 

https://www.dropbox.com/s/nh5dev64dy84v52/CF%20rows2.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM



Microsoft MVP



If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule a short Teams meeting to discuss your question



amitchandak
Super User
Super User

@nkasdali , You can color a row. You can color values. That to one by one. Create a color measure and use that for all values . Conditional formatting -> advance -> field value

 

example

Measure =
Switch(true(),
max(Table[status]) = "In production" , "Red" ,
max(Table[status]) = " Product completed" , "Green" ,
"blue "
)

color Measure =
Switch(True() ,
max(Table[ID]) in {10,20,30} ,"Red",
max(Table[ID]) in {5,15,25} ,"Blue",
"White"
)

 

refer my video: https://www.youtube.com/watch?v=RqBb5eBf_I4

or these for steps

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thanks @amitchandak but in your exemple you're using a TABLE not a Matrix.

@nkasdali , It works in the same manner. In Matrix, you can color only values, not rows(pivot) and columns.  

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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