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