Forum Discussion
elads
7 years agoHelper III
datediff in HH:MM format
Hi, I have two columns: 1. Start time 2. End time. I want to know the duration of time between the two columns in hour and minute format (HH:MM) Then I want to display their summary on the "...
- Anonymous7 years agoCreate a calculated column that for each row will store the number of seconds between the two dates. Then take the measure I've shown you and operate on the SUM of the column. So, you should create a measure like [Total Seconds] = SUM ( T[Seconds] ) and then use its value in my measure replacing the part which is responsible for calculating the seconds...
Best
Darek
Mariusz
7 years agoCommunity Champion
Hi elads
You can do something like below, you can adjust the code to show only hh:mm if you wish, but the below will address the issue of days when the sum goes over 24.
Measure = VAR _all = SUMX( 'Table', 'Table'[End] - 'Table'[Start] ) * 1 VAR _days = INT( _all ) VAR _time = _all - _days RETURN FORMAT( _days, "#0D-" ) & FORMAT( _time, "hh:mm:ss")
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.

Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Anonymous
4 years agoNot applicable
Thnaks for information