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
myth
Regular Visitor

Changing type to Duration turns "seconds" into "days"

Apologies for my limited experience, I'm still becoming familiar with the product.

 

When I change a column holding "seconds" into a "duration" type, it becomes "days". So 130 seconds effectively becomes "130:00:00:00".

 

I'm wondering if there is a way to tell it that it's seconds to begin with, rather than using a formula to turn it into fractions of a day, just so I can use it as "duration" type.

3 REPLIES 3
HarrisMalik
Continued Contributor
Continued Contributor

Hi

 

In which format you have data?

 

Harris

I have the same question and my data format is number. Wondering if there is a way to convert to duration in one click. 

No, not in one click, but you can add a custom column with formula: = #duration(0,0,0,[Seconds])

(Seconds is the field holding your seconds).

This will also work for seconds > 59, so e.g. 130 becomes 0.00:02:10.

Specializing in Power Query Formula Language (M)

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.