Forum Discussion
Sum is displaying wrong after concatenating
Hi all, I'm new to power bi,
I have concatenated the two columns to get the data in "20:45" format by concatenating two columns(int fields). After concatenation the total is becoming either the first value or the last value of the column. Is there any way to get the sum of all the rows as column total?
required output : the highlighted row should be the sum of all rows. that is (0:21+0:37+9:4+1.52+0.8) = 12.3
can someone help me. Thanks in advance
Measure : concat =
CALCULATE(CONCATENATE(SUM([Hours]),
CONCATENATE(":", SUM([Minutes]))
Hi Anonymous ,
To make the calculation in hour and minutes the best option is not to concatenate the values, in this case I would convert your hours and minutes to a single value in minutes and then using a measure similar to the one on the post below make the format, this will work for the line values and the aggregated values:
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
2 Replies
- MFelix
Super User
Hi Anonymous ,
To make the calculation in hour and minutes the best option is not to concatenate the values, in this case I would convert your hours and minutes to a single value in minutes and then using a measure similar to the one on the post below make the format, this will work for the line values and the aggregated values:
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
- AnonymousNot applicable
Thank You MFelix ,
It works as expected.