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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Custom formatting disappears when importing Excel

Hello everyone 🙂

 

Hope you can help me with my issue.

 

I have a column in my excel that has a custom formatting: [h]:mm:ss. This is because I need an hour count. So, if it is a date format, it will never have an hour higher than 23:59:59

 

The problem is that when I import the excel, the column changes to Date, and this problem happens.

 

Does anyone know how to solve this please? 

 

Thank you in advance.

 

Stay safe,

 

Alena

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

You can edit the query and change the Change Type step so that it does not convert it to a date, you probably want to have it be a Duration type in Power Query or Text.

 

You might need this later: https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



Follow on LinkedIn
@ 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!:
DAX For Humans

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

Hello @Greg_Deckler 

Thank you for your reply. If I change the type to duration, it returns error. 

I didn't quite understand what you meant by "You can edit the query and change the Change Type step so " I don't have a "change type" in my query editor. I don't know if that's what you were talking about.

 

Thank you so much for your help. The link you shared will definitely be very useful in other situations 🙂

 

 

 

Hmm, OK, most of the time Power Query adds a Change Type step automatically to just about any query. What happens if you change the type from Date to Text?

What are the underlying values in the Excel? Stripped of formatting, what is the actual data in the cells?


Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors