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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
topazz11
Helper III
Helper III

Days difference between two dates

I have seen a number of posts about calculating the day count between two date.  None seem to address my specific use case.

I'm stuck with some calculation and I could use some help. 

 

This doesnt work...  Date Dif = DATEDIFF(MAX(A[Finish].[Date]),MAX(A[Goal Date].[Date]),DAY)
 

Belos is what I am trying to get;

Del.JPG

 

Thanks,

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @topazz11 

As mentioned  by  @MattAllington   @amitchandak 
Create calculate column :

 

Date Dif = VALUE(A[Finish]) - VALUE(A[Goal Date])

 

Or create measure :

 

Date Dif2 = DATEDIFF(MAX(A[Goal Date]),MAX(A[Finish]),DAY)

 

It shows as below:

63.png

 

Here  is a  demo .

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @topazz11 

As mentioned  by  @MattAllington   @amitchandak 
Create calculate column :

 

Date Dif = VALUE(A[Finish]) - VALUE(A[Goal Date])

 

Or create measure :

 

Date Dif2 = DATEDIFF(MAX(A[Goal Date]),MAX(A[Finish]),DAY)

 

It shows as below:

63.png

 

Here  is a  demo .

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

If the date is in the same table

Date Dif = DATEDIFF(MAX(A[Finish]),MAX(A[Goal Date]),DAY)

 

Also please refer this pbix

https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

 

It has datediff, within table across table

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
MattAllington
Community Champion
Community Champion

I think it doesn't need to be that complex. Assuming you are writing a column, try this. 

Date Dif = value(A[Finish] - A[Goal Date])

 
PS. Don't call your table A



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors