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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
OobuJoobu
Frequent Visitor

Calculated Table Column, Difference between 2 dates, only when both are populated

I have a table that contains, among many others, fields called "DateScreened" and "DateOffered".

 

I need to create a new column ("Date Screeened to Date Offered") that shows the number of days between the 2 dates, but only when both are populated (it is not mandatory for either of these rows to be populated).

 

My new column is currently built like this:

Date Screened to Date Offered = [DateOffered] - [DateScreened]
 
It works perfectly when both dates are populated, but returns, for example, 44916 where the Date Screened is not populated (I understand why, I don't need that answering), I just need it to be blank where either date doesn't exist.
 
Anyone got a way to do this please?

 

 

2 ACCEPTED SOLUTIONS
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @OobuJoobu,

 

How about this:

Date Screeened to Date Offered = 
IF ( 
    OR ( ISBLANK ( [DateOffered] ), ISBLANK ( [DateScreened] )),
    BLANK(),
    [DateOffered] - [DateScreened]
)

 

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

Absolutely perfect, thank you!

View solution in original post

4 REPLIES 4
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @OobuJoobu,

 

How about this:

Date Screeened to Date Offered = 
IF ( 
    OR ( ISBLANK ( [DateOffered] ), ISBLANK ( [DateScreened] )),
    BLANK(),
    [DateOffered] - [DateScreened]
)

 

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Absolutely perfect, thank you!

nvprasad
Solution Sage
Solution Sage

Hi,

You can try below DAX

Date Screened to Date Offered =  IF( [DateScreened] = BLANK(), BLANK(),[DateOffered] - [DateScreened])

 

Appreciate a Kudos! ‌‌
If this helps and resolves the issue, please mark it as a Solution! ‌‌

Regards,
N V Durga Prasad

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

Thank you, I expect that works perfectly, I've already tried the solution from @tackytechtom whch does the job lso.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.