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
amalm
Helper III
Helper III

Major bug in Excel Powerquery (Get & Transform) for dates

My query data is from another excel file. The source file is updated on a daily basis with new records, and I need the query file to transform that data and present it in a proper format. 

 

There is a date column in the source file that has the date in the format DD-MM-YYYY. I need the exact same thing in the query file, so I have set the column as "Date" type. When I go to edit query, this is what I see: (DD-mmm-YYYY which is perfectly fine).

 

Screenshot_12.png

 

Now when I close & load the data, I get this (DD-MM-YYYY which is also perfectly fine with me):

Screenshot_13.png

 


Screenshot_4.png

 

 

However, the problem starts when the data is refreshed the next day with new records. Randomly, some of the dates that were fine the previous day will show up as Integer Type. 

 

The same column after refreshing with new data:

 

Some dates showing as integer types and others are fineSome dates showing as integer types and others are fine   Screenshot_14.png

However if you go back to Edit Query, there is no sign there of this change and all the dates look perfect. It's only in the loaded table that this issue arises.

Needless to say, this is causing great nuisance for my work. Please, I need urgent help. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amalm ,

 

I suspect this may not be so much PQ issue. This looks more like a table/cells formatting issue in Excel itself.

Could you please try:

1. Format the entire column to "Short Date" format. Not just a column in the table, but the entire column in Excel (like "H").

2. If this does not help, delete the existing table from the file (better the entire tab/sheet) and re-export using Load-To or alike to a new tab?

 

Kind regards,

JB

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @amalm ,

 

I suspect this may not be so much PQ issue. This looks more like a table/cells formatting issue in Excel itself.

Could you please try:

1. Format the entire column to "Short Date" format. Not just a column in the table, but the entire column in Excel (like "H").

2. If this does not help, delete the existing table from the file (better the entire tab/sheet) and re-export using Load-To or alike to a new tab?

 

Kind regards,

JB

@Anonymous 

Hi, I thought the problem was resolved, but unfortunately it is not. In one of my files it works well, but in another file it doesn't.

 

Even after formatting the entire column as "Date", this is the result I am getting after refreshing the data if it has new entries:

 

Screenshot_6.png

 

The cell formatting of A1:2617 after refreshing stays as "Date"

The cell formatting of A2618:A2628 after refreshing changes to "General"

The cell formatting of A2629 till the end of the column after refreshing stays as "Date"

 

Can you please explain this weird behaviour?

Anonymous
Not applicable

Hi @amalm 

 

I think for some weird reason Excel remembers the "initial" formatting of cells in the table. I don't remember seeing this with date formatting, but had few examples with cells colour. The best what I could do, deleting the table entirely and re-do it from scratches.

 

Can you try this? Please make sure that you return "date-formatted" data from your query. If this does not help you can try returning dates in the text format and see if this helps.

 

Kind regards,

JB

Thank you so much! Your first point solved the issue I was beating my head over!

 

The thing is, the file had been in use for many months and everything was working fine earlier when the computer was on Office 2016. They recently installed Office 365 on it and this broke the file. Now it works fine again. 🙂

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.

Top Solution Authors
Top Kudoed Authors