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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Matt_W2022
Regular Visitor

Conditional Formatting for blank date based on text from another field

Hi Everyone, 

 

I am trying to highlight the date column red when the date is blank and the status field is "Completed" 

Capture.PNG

I have been able to create a measure that turns the date field red when status is completed, how do i make this only happen when the date is blank?

 

Color Date MPLA =
VAR Name1 = IF(SELECTEDVALUE('PLP & MPLA Qualification Data'[MPLA Status]) = "Completed", True, False)
RETURN
SWITCH(
TRUE(),
Name1 , "RED")
 
Thanks in advance for any advice.

 

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

[Color Date MPLA] =
var StatusValue = 
    SELECTEDVALUE( 'PLP & MPLA Qualification Data'[MPLA Status] )
var DateValue_ =
    SELECTEDVALUE(
        'PLP & MPLA Qualification Data'[MPLA Date],
        // This value makes sure that when many dates are
        // visible in the current context BLANK is not
        // returned as that could change the logic.
        dt"3000-01-01" 
    )
var ColorCondition = 
    StatusValue = "Completed" && ISBLANK( DateValue_ )
VAR Color =
    IF( ColorCondition, "red" )
return
    Color

View solution in original post

2 REPLIES 2
Matt_W2022
Regular Visitor

That has worked a dream, thank you for your help @daXtreme 

daXtreme
Solution Sage
Solution Sage

[Color Date MPLA] =
var StatusValue = 
    SELECTEDVALUE( 'PLP & MPLA Qualification Data'[MPLA Status] )
var DateValue_ =
    SELECTEDVALUE(
        'PLP & MPLA Qualification Data'[MPLA Date],
        // This value makes sure that when many dates are
        // visible in the current context BLANK is not
        // returned as that could change the logic.
        dt"3000-01-01" 
    )
var ColorCondition = 
    StatusValue = "Completed" && ISBLANK( DateValue_ )
VAR Color =
    IF( ColorCondition, "red" )
return
    Color

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.