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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dax help with getting difference between 3 dates

Hello, 

 

I am currently building a dashboard and having trouble creating an expression computing the difference between dates. 

 

This issue is there are three dates to account for 

 

The Created date 

 

The Due Date

 

The Negotiated Due Date.

 

In my scenario I need an expression to compute the time lapsed between the Created date and the Negotiated due date UNLESS the negotiated due date is null, then instead I need the difference between the created date and the Due Date.

 

Any help would be greatly appreciated! 

1 REPLY 1
barritown
Super User
Super User

Hi @Anonymous,

I guess you need a calculated column like this:

barritown_1-1689322195340.png

In plain text:

 

Difference Calculated Column = 
DATEDIFF ( [Created Date], IF ( ISBLANK ( [Negotiated Due Date] ), [Due Date], [Negotiated Due Date] ), DAY )

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.