Forum Discussion

marabeda's avatar
marabeda
Icon for Helper I rankHelper I
4 years ago
Solved

duration above 24h into decimal

Dear Group, I am new on Power BI. I would like to transform columns Durata and Tempo in decimal or duration in Power query editor. I saw different solutions, but I was not able to do it. Can anyone h...
  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    4 years ago

    Replace entire yellow line with this (The formula which had given was to be inserted in a custom column which will generate below code)

    #"Personale" = Table.AddColumn(#"Modificato tipo", "Custom", each [n=Text.Split([Durata],":"),
    d=#duration(Number.IntegerDivide(Number.From(n{0}),24),Number.Mod(Number.From(n{0}),24),Number.From(n{1}),0)][d])
  • marabeda's avatar
    marabeda
    4 years ago

    Thank you very much. It works!!😁