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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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