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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sasdfasdfsad
Helper IV
Helper IV

Matrix: No conditional formatting for rows?

I have a matrix with rows, all expanded set to tabular:
Customer Name, Status, Phone, Address

 

I want to set the Status column value to be red for certain statuses.

I don't see any way to do this with the matrix.

Cell Elements doesn't exist, conditional formatting, nor clicking on the field in the data well for rows and trying to apply conditional formatting.

 

*This is NOT for a measure, just the status field.  It's a text field is all.

3 ACCEPTED SOLUTIONS
PhilipTreacy
Super User
Super User

Hi @sasdfasdfsad 

 

Download example PBIX file

 

You're request isn't entirely clear.  You say you have rows Customer Name, Status, Phone, Address, but then you say Status is a column, so I'm not sure what your data or matrix look like.

 

I'm going to proceed using this data

 

PhilipTreacy_0-1764115433356.png

 

Create a measure that will decide on the color of the Status field

 

Measure = 

VAR _status = SELECTEDVALUE(Data[Status])

RETURN

SWITCH( _status,

    "Bad" , "#FF0000",

    // Add other Status strings + Hex color codes here

    ""

)

 

Select the Conditional Formatting -> Background color for the Status 

 

PhilipTreacy_2-1764115543901.png

 

 

Use these settings for the Conditional Formatting rule

 

PhilipTreacy_3-1764115588269.png

 

PhilipTreacy_4-1764115600714.png

 

If you want to apply this formatting to the entire row, apply the same rule to each of the fields/columns

 

PhilipTreacy_5-1764115907773.png

 

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

danextian
Super User
Super User

Hi @sasdfasdfsad 

If you're referring to the categories, the dimensions that split matrix into columns and rows, those do not support conditional formatting. Only the fields in the value tiles can be conditionally formatted.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

v-hashadapu
Community Support
Community Support

Hi @sasdfasdfsad , Thank you for reaching out to the Microsoft Community Forum.

 

@ChandraTeja@PhilipTreacy , @Kedar_Pande  are correct about the key Power BI limitation you’re hitting, a text field placed in the Rows area of a Matrix cannot be conditionally formatted. Power BI only allows background or font colour rules on fields that live in the Values well, so trying to format Status directly in the row headers simply won’t show any options. @danextian 's clarification aligns with this, only values can be formatted and @Idrissshatila  is right that true row header colouring still isn’t supported today.

 

What does work is shifting the formatting job to a measure in Values. The simple pattern is to create a measure that returns a colour based on the current Status, then add a tiny placeholder measure into Values and apply conditional formatting to it using Format style: Field value, pointing it at your colour measure. Once you hide the placeholder’s text and place it beside the Status row, you get the visual effect you wanted even though the Status field itself can’t be formatted.

 

Thank you @danextian , @Kedar_Pande , @PhilipTreacy , @Idrissshatila & @ChandraTeja  for your valuable responses.

View solution in original post

8 REPLIES 8
v-hashadapu
Community Support
Community Support

Hi @sasdfasdfsad , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.

v-hashadapu
Community Support
Community Support

Hi @sasdfasdfsad , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

v-hashadapu
Community Support
Community Support

Hi @sasdfasdfsad , Thank you for reaching out to the Microsoft Community Forum.

 

@ChandraTeja@PhilipTreacy , @Kedar_Pande  are correct about the key Power BI limitation you’re hitting, a text field placed in the Rows area of a Matrix cannot be conditionally formatted. Power BI only allows background or font colour rules on fields that live in the Values well, so trying to format Status directly in the row headers simply won’t show any options. @danextian 's clarification aligns with this, only values can be formatted and @Idrissshatila  is right that true row header colouring still isn’t supported today.

 

What does work is shifting the formatting job to a measure in Values. The simple pattern is to create a measure that returns a colour based on the current Status, then add a tiny placeholder measure into Values and apply conditional formatting to it using Format style: Field value, pointing it at your colour measure. Once you hide the placeholder’s text and place it beside the Status row, you get the visual effect you wanted even though the Status field itself can’t be formatted.

 

Thank you @danextian , @Kedar_Pande , @PhilipTreacy , @Idrissshatila & @ChandraTeja  for your valuable responses.

danextian
Super User
Super User

Hi @sasdfasdfsad 

If you're referring to the categories, the dimensions that split matrix into columns and rows, those do not support conditional formatting. Only the fields in the value tiles can be conditionally formatted.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Kedar_Pande
Super User
Super User

@sasdfasdfsad 

 

Workaround that usually works well:

Create a measure used in Values (e.g. Status Display = SELECTEDVALUE('Table'[Status])).

Remove the Status field from Rows; keep only Customer, Phone, Address as rows.

Put Status Display in Values.

On the measure in Values, use Conditional formatting > Font color (or Background) and set rules for each status

 

PhilipTreacy
Super User
Super User

Hi @sasdfasdfsad 

 

Download example PBIX file

 

You're request isn't entirely clear.  You say you have rows Customer Name, Status, Phone, Address, but then you say Status is a column, so I'm not sure what your data or matrix look like.

 

I'm going to proceed using this data

 

PhilipTreacy_0-1764115433356.png

 

Create a measure that will decide on the color of the Status field

 

Measure = 

VAR _status = SELECTEDVALUE(Data[Status])

RETURN

SWITCH( _status,

    "Bad" , "#FF0000",

    // Add other Status strings + Hex color codes here

    ""

)

 

Select the Conditional Formatting -> Background color for the Status 

 

PhilipTreacy_2-1764115543901.png

 

 

Use these settings for the Conditional Formatting rule

 

PhilipTreacy_3-1764115588269.png

 

PhilipTreacy_4-1764115600714.png

 

If you want to apply this formatting to the entire row, apply the same rule to each of the fields/columns

 

PhilipTreacy_5-1764115907773.png

 

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Idrissshatila
Super User
Super User

Hello @sasdfasdfsad ,

 

what you can do is color the values that are related for certain statuses like below.

what you can't do is add a dynamic coloring for row coloring, its not available until this period but you can add it as an idea and microsoft will check it out in this link : https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas

 

Idrissshatila_0-1764102282668.png

 

Idrissshatila_1-1764102316289.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




ChandraTeja
Frequent Visitor

@sasdfasdfsad 
You can't apply conditional formatting directly to text fields in the Rows header section of a Matrix, but there's a workaround using a measure in the Values bucket.

DAX Measure 1 (Color Code): Create a measure that uses SWITCH(TRUE(), ...) based on MAX('YourTable'[Status]) to return a specific HEX Color Code (e.g., #FF0000).

DAX Measure 2 (Placeholder): Create a simple measure, like Placeholder_Value = 1.

Matrix Setup: Put the Placeholder_Value into the Values well.

Formatting: Apply Conditional formatting (Background/Font Color) to the Placeholder_Value. Choose Format style: Field value, and base it on your Color Code Measure.

Clean Up: Hide the '1' value (by setting its font color to match the background color) and position the placeholder column right next to your Status column.

This effectively creates a colored "shadow column" that acts as your conditional formatting.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.