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

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

Reply
Waiam_hm
New Member

Can I get the Same format of my data in excel sheet

Hello,

 

I am facing an issue that I have a column in my data the format of this column in dd:hh:mm and if I uploaded to Power query it have as type (any) when I want to change it to text or duration it give either in date time formate or error. could Any one help me in how to get that same format in excel ?

 

this is on excel:

Waiam_hm_1-1690882362153.png

 

 

this is if I leave it as (any) type in power query

Waiam_hm_3-1690882978093.png

this is if change the type to text:

Waiam_hm_4-1690886516173.png

 and if change it to duration it give me error.

 

7 REPLIES 7
Anonymous
Not applicable

Hi @Waiam_hm ,

 

After my testing, if you format the column as text in advance in Excel, the format imported into Power Query is also text and displays the same as in Excel.

vstephenmsft_0-1691392744277.png

Hope that can help you.

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

ronrsnfld
Super User
Super User

That format does not exist in Power Query.  And even in Excel, the "dd" portion cannot be greater than 31. 

 

So if you want to see that same format in Power Query as in Excel, you must construct a text string. You will no longer be able to use it as Duration or DateTime value.

eg:

 

Table1 in Excel

ronrsnfld_0-1690974227770.png

 

M Code:

let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    String = Table.TransformColumns(Source, {"Column1", each 
         Number.ToText(Number.IntegerDivide(Number.From(_),1),"00:") & DateTime.ToText(_,"HH:mm"), 
         type text
    })
in
    String

Result in PQ:

ronrsnfld_1-1690974379292.png

 

 

 

Vijay_A_Verma
Super User
Super User

Please copy few cells of Excel data in an Excel workbook and upload to either Onedrive or Google Drive and share the link here. 

dd:hh:mm
00:20:04
00:00:05
00:00:05
00:00:06
00:00:14
00:00:33
00:00:12
00:00:04
00:00:00
00:00:10
00:00:05

Actually, I need the values copied in an Excel sheet. When you paste it in the browser, it is losing underlying value. For example, there is a seconds component also which is getting missed out. I also need to see if you really have day component in your values or it is just a formatting. 

Vijay_A_Verma
Super User
Super User

Use this formula to convert it into duration in a custom column

Duration.From([Data]-#datetime(1899,12,31,0,0,0)))

 

it does not work gives me error when appling it 

Waiam_hm_0-1690901607982.png

 

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.

Top Kudoed Authors