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! Request now

Reply
Anonymous
Not applicable

I can't turn data type to duration

Hello everyone,

 

I'm currently trying to turn a string column to duration type using Power Query :

 

PBI1.png

 

But it results as an error :

 

PBI2.png

 

Why do you think that happens? Do you think it doesn't work because of the data format or something else ?

3 REPLIES 3
KBO
Memorable Member
Memorable Member

HI @Anonymous ,

here is a the same question, maybe it solves the Problem 🙂 https://community.powerbi.com/t5/Power-Query/Duration-conversion-issues/td-p/819935

 

 

 

 

 

If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Hello,

Thanks for the tip, it kinda worked, but not perfectly : PBI3.png

 

The format is all right, but it's now counting what are supposed to be hours as minutes.
I guess it's because of something in the DAX code. I'm not very found of this code, so does an easy fix exists ? Or maybe resources to learn more about the DAX.

Thank you by advance.

KBO
Memorable Member
Memorable Member

Hi @Anonymous ,

this is not DAX its M-Script in Power Query :). If you are looking to learn more about Power Query, there are a lot of great Blogs and Youtube Videos out there :).

If you have a Demo file for me I can check your code and formatting 🙂

Best,

Kathrin

 

 

 

 

If this post has helped you, please give it a thumbs up!
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors