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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Shivrajvk
Regular Visitor

Duration in Power Bi

I have a column named duration in which data is in the format hh:mm: ss 

The data is displayed correctly in Excel but when I import the excel file in Power Bi, the format of the column changes to a date/time format, something like 12/31/1899 HH:MM: SS. 

How do I get my data in the HH:MM:SS format in Power Bi? I need to calculate the average of that column. 

Please help.

 

Note: I've tried changing the column in excel to General format and then changing the format to duration in Power BI, that gives me the format as DD:HH:MM:SS. 

 

@Greg_Deckler can you please help me?

 

4 REPLIES 4
Shivrajvk
Regular Visitor

Hi @AbbasG , I have the data as below in in Excel, 

Shivrajvk_0-1668598959782.png

 

And what I have in Power Bi is like 

 

Shivrajvk_1-1668599001190.png

I want the data in the format HH:MM:SS. 

 

@Shivrajvk I think you can use the FORMAT function here.

AbbasG_0-1668610372652.png

Additionally, you can also refer the following solution - https://community.powerbi.com/t5/Desktop/Extracting-only-minutes-and-seconds-from-a-date/m-p/2201488...

Hope it helps!

@AbbasG The Format function works by the output is in a text format. I want to calculate the average of the entire duration column. Is there any way to do that?

 

AbbasG
Memorable Member
Memorable Member

@Shivrajvk please share some sample data (after removing all the sensitive information), with desired out come.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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