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
Creative_tree88
Helper III
Helper III

Days between two dates but ignore blank cells?

Hi Guys - seems simple, but trying to find a solution to calculating days between a date and today's date, but not all my cells have a value in it.


My date column is called DoH Deadline and it only populates a small percentage of the whole dataset, but it's also extremely important I'm able to show how many days (to today's date) until this deadline arrives!!

What I have so far is, simply:

Days to Deadline = 'Waits'[DoH Deadline] - TODAY()

Works fine, but also brings back loads of -44956's as it's clearly trying to calculate something which doesn't exist in the cell.  Could you suggest an easy solution, to give me the days, but ignore the blanks, so the only cells which are populated with 'Days to Deadline' are those which have a date to work from.

I'm sure it's a relatively easy fix, but I am just struggling.  Thanks in advance.

Rgds


1 REPLY 1
amitchandak
Super User
Super User

@Creative_tree88 , seem like you have blank date

 

try like

 

Days to Deadline = if(isblank( 'Waits'[DoH Deadline]) , blank(),  'Waits'[DoH Deadline] - TODAY() )

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.