Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Post Partisan
Post Partisan

How to calculate average time in minutes with 1 date column between multiple rows

Hi all,


I am not sure on how to approach this requirements. Hopefully you can help me.


The endresult should be a table with my users, total documents and the average time they spent updating these documents. Below is an example of my dataset. There should be a calculation for a user, taking the average time they spent between the first document they updated and the last. For example if a user updated 10 documents. 5 documents in 2 minutes and 5 documents in 6 minutes. The average would be 3 minutes for that user. Problem here is dat I do not have a start and enddate in the same record. 


0481F5E8-4791-4BC7-B3CA-2019A900F68202/11/2022 06:54a.ab
08368D46-0789-4873-9D82-84247D6E8A5A02/11/2022 07:27a.ab
091D1540-5FF1-4348-B495-6CBFF102315402/11/2022 09:58a.ab
0ACB1DAB-B9AF-4E31-BC9F-268E1433232E02/11/2022 07:25a.ab
0C7B8D67-CC24-473D-B97D-EE7FE3C37E0602/11/2022 09:24a.ab




A10010-11-2022 09:0010-11-2022 17:005
B5010-11-2022 09:0010-11-2022 20:0030


Thank you very much for your help!


From the data delivery team i've now received a time in seconds per item. So now I'm able to calculate the average time. This requirement is no longer needed. Thanks for your time!

View solution in original post

Solution Sage
Solution Sage

Can you not simply type out two sample rows of incoming data for one user, then type out an output row for what that data should translate to?

For example:

Document GUID    Update Date              User

===========   ========              ====

ABCD                      11/1/2022 9:00 AM     A

EFGH                        11/1/2022 9:05 AM    A




From the data delivery team i've now received a time in seconds per item. So now I'm able to calculate the average time. This requirement is no longer needed. Thanks for your time!

Solution Sage
Solution Sage


Can you give us pseudo-data? Plus your End Result grid data does not really match with the incoming sample. Sample has ranges of 02/11/2022 , but the End Result shows 11-10-2022.

Also, are BOTH dates formatted as MM-DD-YYYY?

Is 02/11 February 11th, or November 2nd? 

What is the "" at the end of the first row?

@ToddChitt thanks for looking into my problem.


Sorry for the inconvenience. When posting, it told me that the HTML code had been corrected and then it removed the layout I had. Result is that spaces are gone. Don't know what went wrong :(.


The end result data indeed does not match. It's an example to hopefuly explain the problem and situation that I have. The data is for a full year, but in the report the end user views it per day. 

-Table is indeed formatted as MM-DD-YYYY
-It's November 2nd is the name of a user (Letter of first name, divided by '.' and then first 2 letters of last name). I quickly masked this data.

What's the best way to share an excel file here?



Super User
Super User

@DeBIe , Based on what I got


Averagex(Values(Table[User]), calculate(datediff(min(Table[Update date]), Max(Table[Update Date]) , Minute) ) )

Hi @amitchandak  thank you for your reply.


I've tried this measure, but it returns the total minutes from first(min) UpdateDate and the last(max) UpdateDate. It does not give me the average for some reason. Any idea why? Because the formula starts with AverageX

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors