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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jmspbooth
Frequent Visitor

Count days between date rows in single column

Referenced the below thread but wasnt able to get it working for me. I have a single column thats formatted as 'Date'. I need to be able to calulate the difference between the 'Days submitted'. This list has multiple different 'system acronym' fields that are being filtered on the visualization by a slicer. There is another field for 'System Version' that could also be referenced to differentiate, but it is a text field using the 'x.x.x.x' syntax.

 

https://community.powerbi.com/t5/Desktop/Calculating-time-between-two-rows-in-the-same-column/td-p/1...

 

Capture.PNG

 

 

Any help is greatly appreciated!

 

 

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @jmspbooth 

 

You can try the following methods.

Column:

 

Previous Date =
MAXX (
    FILTER ( 'Table', [Date Submitted] < EARLIER ( 'Table'[Date Submitted] ) ),
    [Date Submitted]
)
Difference = 
IF([Previous Date]<>BLANK(),[Date Submitted]-[Previous Date],BLANK())

vzhangti_0-1654246120762.png

Is this the output you expect?

 

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This didnt work for me. I added more detail in my response from @tackytechtom if you want to look there. Below is what I get at the end.

 

date-diff-error03.PNG

 

tackytechtom
Super User
Super User

Hi @jmspbooth ,

 

I just throw this one out here.

 

If this doesn't help, I am happy to give you some more support! Just share some sample data 🙂

 

/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 

Since my company has our connection filtered I cant get to that normally and have been working through it from another PC at home. So its taking me a little longer. 

When I had a small data set it worked perfectly. I ingested a larger dataset that is being filtered out by a slicer and it stopped calulcating correctly. 

 

The source table is going to be updates by multiple different teams and I need to calculate the differene in time between submission dates per team. (i.e Team A submits 1/1/22, Team B submits 1/15/22, Team A submits 2/1/22, Now calculate the difference in time between Team A submit (1) and submit (2)). There are ~75 teams each with their own submission schedule. 

Ultimately I need to make sure each team is submitting information every 30 days. So this calculation is to track that and display on a stacked area chart.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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