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
elads
7 years agoHelper III
Hi,
Thank you for your answer,
The result is good, but I have to summarize the hours and minutes.
I don't seem to be able to do that because this field is text.
BR,
Alon
Anonymous
7 years agoNot applicable
Mate, a little bit of thinking goes a long way... If you have to summarize, then the measure should first add up all the seconds and then apply the above formula to this sum. Is this not obvious?
Best
Darek
Best
Darek
- elads7 years agoHelper III
Hi Anonymous,
Do you have an example of such a calculation ..?
- Anonymous7 years agoNot applicableCreate 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- elads7 years agoHelper III
Hi,
I created a calculated column that sums up the seconds between the two columns
sum_Diff_In_Second = sum(Table_Name[Diff_In_second])Which part of your code should I replace not so clear ..?