Forum Discussion
Not getting Duration to work.
Hi all.
I'm trying to get out the total number of minutes from "Sluttid" and "Starttid" and find how many minutes differs the two.
However Durations don't seem to work like you can see below and I wonder why... and what I can do about it!
filip_u_s I think your two columns are Time columns and not Duration columns so you will need to convert them to Duration columns first. Or use Time.Minute instead.
Good day filip_u_s,
Table.AddColumn(#"Filtrerade rader1", "Mintid", each Duration.TotalMinutes([Sluttid]-[Starttid]), Int64.Type)
gives,
This should work provided Sluttid is greater than Starttid.
Hope this helps.
4 Replies
- Greg_DecklerCommunity Champion
filip_u_s I think your two columns are Time columns and not Duration columns so you will need to convert them to Duration columns first. Or use Time.Minute instead.
- filip_u_sRegular Visitor
Thank you Greg... you were so right... shame there is no time.totalminutes... but now I can keep building my report 🙂
- collinsgSolution Sage
Good day filip_u_s,
Table.AddColumn(#"Filtrerade rader1", "Mintid", each Duration.TotalMinutes([Sluttid]-[Starttid]), Int64.Type)
gives,
This should work provided Sluttid is greater than Starttid.
Hope this helps.
- filip_u_sRegular Visitor
wow, thanks collinsg... that really did the trick and so easily!