Forum Discussion
pdindukurthi
Helper I
2 years agoNeed a calculated column based on the existing column
Hi All, Need some help in calucation of time in hours and data is coming in the below format(directly from Source ITSM Ticekting tool) We need to convert each row into days or hours or minutes so ...
- 2 years ago
In your code, remove everything after your Source line, past below
MapTbl = Record.FromList({18144000, 604800, 86400, 3600, 60, 1},{"mos","w","d","h","m","s"}), #"Added Custom" = Table.AddColumn(Source, "Custom", each List.Sum(List.Transform(Text.Split([Resolution Time in Bhrs], " "), (x)=>Number.From(Text.Select(x, {"0".."9"})) * Record.FieldOrDefault(MapTbl, Text.Select(x, {"a".."z"}))))) in #"Added Custom"
pdindukurthi
Helper I
2 years agoHi
My source is different however how to replace my source in the exisiting code
Vijay_A_Verma
Most Valuable Professional
2 years agoIn your code, remove everything after your Source line, past below
MapTbl = Record.FromList({18144000, 604800, 86400, 3600, 60, 1},{"mos","w","d","h","m","s"}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each List.Sum(List.Transform(Text.Split([Resolution Time in Bhrs], " "), (x)=>Number.From(Text.Select(x, {"0".."9"})) * Record.FieldOrDefault(MapTbl, Text.Select(x, {"a".."z"})))))
in
#"Added Custom"