Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi!
I am trying to build lag analysis. For that, I have a view with timestamps and various lags between them. I so far did two things.
-> calculated each lag into dd hh mm format using DAX, however these results are only valid on row level, and I am interested in averages.
-> Changed the original column with a lag, into a duration type. I can then see, in power query, that for that given parcel, the duration is expressed in hours. See example of the first parcel, it shows 10h 11 min 36 sec. However, when closing and applying, after refreshing, the desktop report still shows the same lag as a fraction of a 24h (see on the left), 0.42.
How do I convert into a duration format that is easily readable to the business and on which I can calculate averages?
Thank you,
Lena
Solved! Go to Solution.
Hi @Lena85 ,
I reproduce your question.
In the Power Query:
In the table:
You can change the type of the data like this:
Then calculate the average:
Average = FORMAT(AVERAGE('Table'[Time]),"hh:mm:ss")
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your suggestion. However when I replicate it, I get the following error:
Some of our lags have negative values as we calculate period from B - A, but sometimes, in our processes, the B can take place before A. I then cannot convert this to time. Is there any solution to this?
Hi @Lena85 ,
I reproduce your question.
In the Power Query:
In the table:
You can change the type of the data like this:
Then calculate the average:
Average = FORMAT(AVERAGE('Table'[Time]),"hh:mm:ss")
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 54 | |
| 42 | |
| 30 | |
| 24 |