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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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