Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

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.


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() )

!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors