Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I've a column with fixed time which begins from 2000-01-01 00:00:00
If we find 2000-01-02 03:10:10 in that column it means 27h, 10 min, 10 sec in duration. How can I calculate and get it as result?
Have a great day
Solved! Go to Solution.
hi @Kratchie
not sure about your ultimate goal, try this:
I assume you are later going to aggregate your durations in a measure, so please see this article for a good way to handle durations as decimals (in days) so you can easily do math and use them in visuals, but then display them as hh:mm, etc. when needed.
Calculate and Format Durations in DAX – Hoosier BI
Pat
Hi @ppm1,
This I have done before without any problem when it's two columns with both start/end date+time (split it into 4 columns (start&date, end&date, start&time, end&time) but now I need to get duration from fixed timestamps as I wrote above which isnt that easy. I have googled for different solutions but couldn't find any.
Hi @Kratchie
try to create a column with this:
Hi @FreemanZ
Your script works perfectly with hours only. When it's more than 24 hours like 1 day + 6 hour it only shows 6:00
hi @Kratchie
not sure about your ultimate goal, try this:
Hi,
Here is one way to do this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi @ValtteriN,
When I created a new visual table and added only DURATION column with your script it worked like a charm. BUT when i'm adding more columns it stopped to work by any reason. Seems that only timestamps with seconds still works partly (only hours + seconds), but when it's whole hour. It doesnt work?!
@Kratchie hmm,
That seems quite weird. The first things that come to my mind are te following:
1. Are there some other dimension information or slicers affecting the visual?
2. Is the data format similar in both your example and the data in question
When I tried to re-create this the formula worked well even with whole hours and dates across different months:
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
7 |