Forum Discussion
Sum up total time per group
Hi guys,
Could you please show me how to sum up total time by name ? (ie: Total time of May Asher should be 6h35m )
Thank you for your help
Best regards ,
NT
2 Replies
- tackytechtom
Most Valuable Professional
Hi ntruong1994 ,
In your case I would have probably done something like this:
And here the M code for the new column:
Number.FromText (
Text.BeforeDelimiter([duration],"h")
) * 60
+ Number.FromText (
Text.BetweenDelimiters([duration], "h", "m" )
)I used a variation from this blog post that has a little bit more explanations as well:
https://www.tackytech.blog/how-to-swiftly-take-over-power-query/#11_Calculate_duration_from_time_columnLet me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/ - tackytechtom
Most Valuable Professional
Hi ntruong1994 ,
I'd suggest to convert the time column into a format that makes it easy for Power BI to calculate a sum over them i.e. minutes?
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/