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
Rabi
Resolver I
Resolver I

Conditionally Format values in column with blanks

Rabi_1-1702938638377.png

Hi Everyone, 

 

I have Approved and Unapproved in the column header in a matrix and i am conditionally formatting the values if Approved red else Green, but there are blanks in the column and i want to format those blanks the colour assined to Approved and Unapproved.  How can i achieve this. Below is my dax measure

Color Status = 
IF(
    MAX('TableA'[Approved/Unapproved]) = "APPROVED",
    "Red",
    "Green"
)

Thanks for help !!

 

1 REPLY 1
123abc
Community Champion
Community Champion

Create a Measure for Conditional Formatting: Create a new measure that will be used for conditional formatting. Modify your existing measure to handle the blank values

 

Color Status =
IF(
ISBLANK(MAX('TableA'[Approved/Unapproved])),
"YourColorForBlank", -- Replace with the color for blanks
IF(
MAX('TableA'[Approved/Unapproved]) = "APPROVED",
"Red",
"Green"
)
)

 

  1. In the above DAX measure, the ISBLANK function is used to check if the value is blank. If it is, you can specify the color you want for blank cells. Adjust "YourColorForBlank" to the desired color.

  2. Apply Conditional Formatting: Now, apply conditional formatting to your visual (matrix or table) based on the new measure.

    • Select the column you want to format.
    • Go to the "Format" pane.
    • Find the "Conditional formatting" section.
    • Choose "Color scale" or "Font color" depending on your requirement.
    • Select the new measure ("Color Status") as the field to base the formatting on.

    Adjust the formatting rules to fit your color-coding needs.

  3. Adjust Colors for Blanks: Make sure that you've set the color for blanks in the formatting options.

    • If using "Color scale," you might need to set the color for the minimum or maximum value (whichever represents blanks).
    • If using "Font color," set the color for the value you specified for blanks in the DAX measure.

This way, your visual will now use the conditional formatting measure to determine the color for each cell, including handling blanks according to your specifications.

 
 
 
 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Helpful resources

Announcements
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.