Forum Discussion
misunika95
6 years agoFrequent Visitor
Duration conversion issues
Hi Everyone! I have some data that reflects how long a person took to resolve a dispute. The format is hh:mm (for example 1328:45) and when I try to change the data type to duration the following...
- 6 years ago
You can use the following custom step:
= Table.TransformColumns(PreviousStep,{{"ColumnName", each let parsed = Text.Split(_, ":") in #duration(0, 0, Int64.From(parsed{0}), Int8.From(parsed{1})), type duration}})Just change PreviousStep and "ColumnName" to appropiate values.
artemus
Microsoft Employee
6 years agoYou can use the following custom step:
= Table.TransformColumns(PreviousStep,{{"ColumnName", each let parsed = Text.Split(_, ":") in #duration(0, 0, Int64.From(parsed{0}), Int8.From(parsed{1})), type duration}})Just change PreviousStep and "ColumnName" to appropiate values.
misunika95
6 years agoFrequent Visitor
It worked, thanks a lot! Do you happen to know how can I display the data? At the visualization level I get very low number values.
Thank you!!
artemus wrote:You can use the following custom step:
= Table.TransformColumns(PreviousStep,{{"ColumnName", each let parsed = Text.Split(_, ":") in #duration(0, 0, Int64.From(parsed{0}), Int8.From(parsed{1})), type duration}})Just change PreviousStep and "ColumnName" to appropiate values.