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
PatrikRoos
New Member

Can't set type to Duration

Hi

 

I have o problem with a column that is as standard set to Time. But i have to change it to Duration. The data is looks like this:

powerbi1.jpg

 

But when i change the format to Duration i get an error:

DataFormatError: Can not convert to Duration

powerbi2.jpg

 

Anyone know how to fix this?

 

Thanks

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi PatrikRoos,

 

I also can’t reproduce the issue. The Time value can be changed as Duration data type values in query editor. In your scenario, I would suggest you open a new connection to get time data, without apply any other steps, then change its data type to Duration to see if issue occurs. And which region did you set in Power BI Desktop (Options->Regional settings->Locale). And what’s the region of your system which desktop runs on?

 

If issue persists, would you please share a pbix file with the sample data to reproduce your issue?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi PatrikRoos,

 

I also can’t reproduce the issue. The Time value can be changed as Duration data type values in query editor. In your scenario, I would suggest you open a new connection to get time data, without apply any other steps, then change its data type to Duration to see if issue occurs. And which region did you set in Power BI Desktop (Options->Regional settings->Locale). And what’s the region of your system which desktop runs on?

 

If issue persists, would you please share a pbix file with the sample data to reproduce your issue?

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ankitpatira
Community Champion
Community Champion

@PatrikRoos I cannot replicate your issue. Only issue i can think of is that when I convert to type Time, I see data being changed to AM/PM format which doesn't look like in your screenshot so maybe worth looking at why that is not happening. Othersie I have no problems in converting it to Duration type.

 

Capture.JPG

 

 

 

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.