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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yacine-Eurovia
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 :

 

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
MVP

HI @Yacine-Eurovia ,

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!

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.

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 🙂

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.