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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
cv2qm
Helper I
Helper I

Conditional Formatting for Entire Row in Matrix table

Hello,

 

I am trying to get colour on entire row. 

I can colour only for specific value or column. But i need it for entire row.

 

Requriement:

Want to colour entire row based on number of empty cells

Untitled.png

 
 
 
 
 
 

Tried : This is not working for me, Unable to get Measure in HASONEVALUE.

https://community.powerbi.com/t5/Desktop/Background-color-for-a-row-table-matrix/td-p/714419

 

Thanks in advance.

 

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @cv2qm

 

Turn to the post below,I guess it will help.

 

https://community.powerbi.com/t5/Desktop/Conditional-Formatting-for-Measures-in-Rows/td-p/159321

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

Hasonevalue is needed when you select the parameter value. For the measure, you can write direct conditions.

 

For row you have to repeat it for each column. This means the same condition for all columns.

 

Color Brand = if(FIRSTNONBLANK('Item'[Brand],BLANK())="Brand 11","red","green")
Color scatter = if(SUM(Sales[Net Sales])>2500 && SUM(Sales[Margin])>400,"green","red")

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

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

Can't do it for each column. Sections(Column) will change based on slicer selection.

FIRSTNONBLANK() will also not work for measures. 

 

Thanks!

For Measure, I shared the second option. Also when in a matrix you select both column and row, Then your formatting based on the measure should work.

Color scatter = if(SUM(Sales[Net Sales])>2500 && SUM(Sales[Margin])>400,"green","red")

Screenshot 2020-02-22 01.10.20.png

 

Conditional formatting of matrix has been used

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.