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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Don't calculate null/blank date column

I've searched and tried severad methods but can't get this scenario to work.  I'm looking to use conditional formatting on a date column but the best solution I could come up with is creating a new column that counts the following:

Target Date < Today = IF ( [Target Date Column] < Today( ), 1, 0)

 

This gives me a new column of 1's and 0's that I can use for conditional formatting.  

The problem:

In [Target Date Column] there might not be a date which will show as null which I know is considered as blank.  How do I get the above statement to not include anything that is blank?

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@Anonymous 

You can use nested IF, something like:

 

Target Date < Today = IF ( [Target Date Column] = Blank() , Blank(), IF ([Target Date Column] < Today( ), 1 ,0)

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Tahreem24
Super User
Super User

You can use IsBlank(TargetDateColumn) or If( TargetDateColumn=Blank(), TrueCondition Expression, FalseCondition Expression).

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Thanks but this only lets me know if the column is blank. What I'm trying to do is have it skip over anything that is blank.  Only look at fields that have a value present or in this case, not blank. So anything that is not blank in the TargetDateColumn that is < today(), then false, else true.

 

TargetDateColumn that is NOT blank AND is < Today( ), then 1, else 0 - leave the blank TargetDateColumn values as blank.  This way I only see a "1" value if it's < than today's date and a "0" value if it's > than today's date.  The rest remaing blank untile a value is added to the TargetDateColumn.

@Anonymous ,

 

Try something like below:

Column = IF(AND(ISBLANK(Sheet10[Date]),Sheet10[Date]<TODAY()),1,0)
 
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.