Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Attempted unsuccessfully to convert text from column labeled "Handled Duration" into duration type with format "00:00:00". Purpose is to eventually use this column to calcuate total and average handle time durations. Have tried simply changing format (which returns expressions:error:we couldn't parse the Duration literal). I'm aware of the duration.fromtext function, though every iteration i've tried has failed. Can someone please assist?
Solved! Go to Solution.
Hi, @Brazen_BI
=Time.From(
Text.Combine(
List.Transform(
Text.Split([Handled Duration],", "),
each Text.BeforeDelimiter(_," ")),
":")
)
or
#time(
Number.From(Text.BeforeDelimiter([Handled Duration]," Hours")),
Number.From(Text.BetweenDelimiters([Handled Duration],"Hours, "," Min")),
Number.From(Text.BetweenDelimiters([Handled Duration],"Minutes, "," Sec")))
Stéphane
Hi, @Brazen_BI
=Time.From(
Text.Combine(
List.Transform(
Text.Split([Handled Duration],", "),
each Text.BeforeDelimiter(_," ")),
":")
)
or
#time(
Number.From(Text.BeforeDelimiter([Handled Duration]," Hours")),
Number.From(Text.BetweenDelimiters([Handled Duration],"Hours, "," Min")),
Number.From(Text.BetweenDelimiters([Handled Duration],"Minutes, "," Sec")))
Stéphane
Thanks. I combined this solution with a measure to calculate average duration time to get the final visual I needed: