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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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


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.


Click here to visit my LinkedIn page

Click here to schedule 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


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.


Click here to visit my LinkedIn page

Click here to schedule 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


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.


Click here to visit my LinkedIn page

Click here to schedule 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

Share with Power BI Enthusiasts: 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.  

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors