Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have seconds in a column and converting this to a time HH:mm:ss with the function below. I have noticed this worked perfectly except it never goes over 24 hours (When looking at the data, it definitely should). Also, i am not able to add these together. Is there a way i can change the function below to achieve this?
Got this off youtube at some point, it does work great with the conversion!
Solved! Go to Solution.
well like i said before, I tried it with 90,064 seconds (25 hours, 1 min and 4 seconds) and I get a correct
25:01:04
so it seems to work fine
Ive been trying to replicate this, but only with 'half' success.
For variable H, I could only get this to work if I swapped CONCATENATE ( "0", Hours ), for CONCATENATE ( 0, Hours ) and CONCATENATE ( "", Hours ) for Hours. Similarly for M and S.
Without this change, all I have output is blanks.
With the change, I can return H, or M, or S, on there own, and the result seems ok.
So, more hours of checking.
The formula works - but only when that table is used in isolation. When I create a relationship to another table, :: are displayed.
Hi @thampton
what do you mean it doesn't go over 24 hours? I just tried 90,064 seconds (25 hours, 1 min and 4 seconds) and I get a correct
25:01:04
For example, I have the rows as shown below and the total does not add up. I am not sure where it is getting the total.
Row Time
1 22:37:42
2 19:59:09
3 19:16:21
4 15:40:28
5 09:16:36
6 06:16:31
7 02:55:14
TOTAL 00:02:01
I see. That's a different story. But the problem then lies then most likely with the result [Total Seconds] is yielding and not with [Final Duration]
What you're showing is a matrix visual? What goes into the column Time?
I am adding two measures together (each summing the final duration column on their respective table) to create the value in Time column. Its funny, as it works when the total is under 24 hours.
Can you share the pbix?
Or can you try to show in Time the number of seconds resulting from the addition of those two measures, without the conversion, to see if the value to be converted is actually above 86400 (24 hours)?
I think i see the issue, i am not account for a day in my function. I tried 100485 seconds and it showed 03:54:45. This would be correct as it is 27 hours.
Is there a way to show only hours instead of adding days into function. I would ideally like to have 27:54:45.
I don't understand what you mean. What function are you talking about? The measure [Final duration]?
The DAX above where i am doing the conversion. I do not account for days in that which is why when adding togeher, it rolls over at 24 hours (this is what im thinking).
well like i said before, I tried it with 90,064 seconds (25 hours, 1 min and 4 seconds) and I get a correct
25:01:04
so it seems to work fine
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |