Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Troubles getting duration for more than 24 hours power query

 

Hello! Im having an issue that I saw in another post people could solve it using a formula but I cant unfortunately (I'm using a formula @MFelix posted in another guys topic with the same issue)

I have this column with those values, and I want to get the same values but shown as a duration

ivoferrari_0-1646478072529.png

If I use this formula (That is the one I saw it worked for other people)

let
    DurationFromYourText = (text as text) as duration => let
        Split = Text.Split(text, ":"),
        AsNumbers = List.Transform(Split, Number.FromText),
        Duration = #duration(0, AsNumbers{0}, AsNumbers{1}, AsNumbers{2})
    in
        Duration,
    Invoked = DurationFromYourText([UpTime])
in
    Invoked

 I get this error:

ivoferrari_1-1646478153398.png

ivoferrari_2-1646478162416.png

Could somebody please give me a hand?

Thank you very much!

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi  @Anonymous - this is problem with the Seconds in the duration function.

 

 

AsNumbers{0}, AsNumbers{1}, AsNumbers{2}

 Please remove the AsNumbers{2} by setting to 0.  or change to the following

 

AsNumbers{0}, AsNumbers{1}, try AsNumbers{2} otherwise 0

Many thanks

Daryl

View solution in original post

4 REPLIES 4
PaulMac
Helper IV
Helper IV

@Daryl-Lynch-Bzy But how do I implement such answer as this into an existing query?

I just receive an error stating "Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?"

Sigh 😥

@PaulMac - can you please create a new issue to share with the community?

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi  @Anonymous - this is problem with the Seconds in the duration function.

 

 

AsNumbers{0}, AsNumbers{1}, AsNumbers{2}

 Please remove the AsNumbers{2} by setting to 0.  or change to the following

 

AsNumbers{0}, AsNumbers{1}, try AsNumbers{2} otherwise 0

Many thanks

Daryl

Anonymous
Not applicable

Thank you so so much!!! When you told my I realize how silly my error was.

Thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors