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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
stites_adam
Regular Visitor

Total dates between a set of dates.

Hi, 

I am looking on how to get this to give me the total of the diff from the first date and the last date- 

I need the total from 1/4 to 2/17- 44 days not 4 days.

 

stites_adam_0-1614897689973.png

 

 

 

 

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @stites_adam 

 

Download example PBIX with data and code

 

This works for me

 

TotalDays = DATEDIFF( FIRSTDATE('Detail'[Actual Start Date]), LASTDATE('Detail'[Actual Finish Date]),DAY)

 

dat1.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

6 REPLIES 6
PhilipTreacy
Super User
Super User

Hi @stites_adam 

 

Please @ mention me in replies or I will not see them.  Type @ then select my name.

 

Can you please provide your PBIX or your data?

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


@PhilipTreacy It may be the index that was added, I do not have that. Sorry, I am new at this all. I will try to upload my PBIX.

 

@stites_adam 

No worries.

Upload the PBIX to OneDrive or DropBox then link to it here.

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


@PhilipTreacy - This formula did work! Sorry for the delay on getting back to you. 

 

PhilipTreacy
Super User
Super User

Hi @stites_adam 

 

Download example PBIX with data and code

 

This works for me

 

TotalDays = DATEDIFF( FIRSTDATE('Detail'[Actual Start Date]), LASTDATE('Detail'[Actual Finish Date]),DAY)

 

dat1.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Oddly, I still get 4 as the total- 

stites_adam_0-1614899518498.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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