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
pmdci
Advocate V
Advocate V

Confused with duration support

Hi,

 

I am a little confused about the support for duration in Power BI.

 

I can see that there is an option to configure a column in the Query Editor as Duration under Date & Time Column, however the option to set is as duration is grayed out. I tried with fields formatted as HH:MM:SS format and decimals, but no luck.

 

Also what if I am hoping that such formatting for duration would be done at the tabular model, not at the query time. Say that I want to create a PowerPivot model in Excel 2016... How would I go about setting a field as duration?

 

Thank you for your time and support.

 

Regards,

P

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@pmdci - Duration is formatted d.hh:mm:ss and you first have to make sure that the Data Type in the Transform | Any Column area is set to "Duration", then the button that you are referring to will not be grayed out.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@pmdci - Duration is formatted d.hh:mm:ss and you first have to make sure that the Data Type in the Transform | Any Column area is set to "Duration", then the button that you are referring to will not be grayed out.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you so much for this post!  I've been searching everywhere for the correct format to make duration work.

There is no support for a duration type in DAX/Tabular yet. I do not know if this is planned, but Power BI has brought more alignment between M and Tabular data types so far.

 

If you import a duration type into a data model, it will be cast to a decimal type.

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.