Forum Discussion

pdindukurthi's avatar
pdindukurthi
Helper I
2 years ago
Solved

Resolution Time in Bhrs

Hi All, I have data coming from directly from ITSM Ticketing tool and it is storing in the form of text and format is "1d 0h 55m 55s" Now we need to convert that number into hours  Kindly help how...
  • slorin's avatar
    2 years ago

    Hi,

     

    = Table.TransformColumns(
    Table.ReplaceValue(Your_Source,null,null,
    (x,y,z)=>Text.Combine(
    List.ReplaceMatchingItems(
    Text.ToList(x),
    {{"d","*86400"}, {"h","*3600"}, {"m","*60"}, {"s",""}, {" ","+"}})),
    {"Resolution Time in Bhrs"}),
    {{"Resolution Time in Bhrs", each Expression.Evaluate(_)/3600, type number}})

    Stéphane