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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
krajivga
New Member

Time duration not able to covert to hh:mm

we ahve the downloaded data for the operation time in text form example 03:45 , if we load the data in the Power query data not converted to duration if the value beyound 24:00 , shows error . if we convert in differnt form but not able to use in visuals to create bar graph/ pivot chart. able to use only as Card.

Screenshot 2025-10-24 132202.jpg

1 ACCEPTED SOLUTION

my suggestion would be to convert the HH:MM to a regular number ( split the value by ":" and then divide the minutes by 60. then add it again). This way you get from 26:40 number 26,66. Then you can sum it in power bi and work with it in visuals. Next you could probably convert the number in a measure to display the number in the format you want (26:40 again...)

View solution in original post

8 REPLIES 8
v-nmadadi-msft
Community Support
Community Support

Hi @krajivga 

May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

v-nmadadi-msft
Community Support
Community Support

Hi @krajivga 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


Thank you.

vojtechsima
Super User
Super User

hey, @krajivga ,

if you want actual code, how to split it, here it is:

= Table.AddColumn(#"Changed Type", "Custom", each let 
hours = Text.BeforeDelimiter([dur], ":"),
minutes = Text.AfterDelimiter([dur], ":"),
dur = #duration(0, Number.From(hours), Number.From(minutes), 0)
in dur, type duration)

 

click new Step and replace it with this, make sure you correctly change #"Changed Type" to your last step.

 

vojtechsima_0-1761321091754.png

 

If you wanna go throught the GUI, click new custom column and paste this:

let 
hours = Text.BeforeDelimiter([dur], ":"),
minutes = Text.AfterDelimiter([dur], ":"),
dur = #duration(0, Number.From(hours), Number.From(minutes), 0)
in dur

 

This will then be converted to a number later in DAX:

vojtechsima_0-1761321925739.png

 

Thank u very much

krajivga
New Member

Hi ,

The Format of input which is downloaded report from SAP (its in Text form of hours) , while in excel we have sum after converting the data type thru delimiter to sum up even beyound 24 hrs, but in power query we have tried many steps, it won't work as per our requirment . 

1. data type should in duration also retain the format HH:MM even beyound 24 hrs.

2. This need to be summed up, also to be used in bar and pivot charts .

pls suggest solution for that 

my suggestion would be to convert the HH:MM to a regular number ( split the value by ":" and then divide the minutes by 60. then add it again). This way you get from 26:40 number 26,66. Then you can sum it in power bi and work with it in visuals. Next you could probably convert the number in a measure to display the number in the format you want (26:40 again...)

Ok thanks, i will work on this like that.

zenisekd
Super User
Super User

Hi, the reason is that the format you provide is not supported. 
Check out this: https://community.fabric.microsoft.com/t5/Power-Query/Data-Type-Duration/td-p/3134574

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.