Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

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 :




But it results as an error :




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


HI @Yacine-Eurovia ,

here is a the same question, maybe it solves the Problem 🙂






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


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.

Hi @Yacine-Eurovia ,

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 🙂







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

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors