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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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