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
Anonymous
Not applicable

Date Formatting - Excel to Power BI (FAIL)

In this scenario - all dates occur in the month of June 2021.

In Excel: I define a column data type as being a date. I define that date sequence as being dd/mm/yyyy

PJTroyer_1-1624318352498.png

 

In Power BI: I import the data from excel and ensure the formatting has pulled over correctly, and matches. 

PJTroyer_2-1624318481392.png

 

Power BI fails to understand date formatting - all dates should show in june. 

Power BI trades the day for the month. 

PJTroyer_3-1624318753663.png

 

 

 

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

I resolved the problem - the date formatting I was using in Excel was incorrect. I used the "Text to Columns" tool to fix the problem. 

 

Apparently using the Data Type selector in Excel has no effect if the cells come from a csv file.  

View solution in original post

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test, I have created a Date column in Excel, and using the date format in English(Canada):

date format in Canada.PNG

After connectng and transform the table in Power BI, the data type was specified as Text. Because the default locale of my Power BI  is English(United States) in which date format is mm/dd/yyyy:

default locale.PNG

 

So in this case, please right-click the column --> Change Type, select "Using locale", then the type will be changed to Date successfully.

using locale.PNG

At last, apply all changes--> Click the Date column in Field pane--> Select Column tools-->Format it as dd/mm/yyyy:

Format date.jpg

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

View solution in original post

7 REPLIES 7
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test, I have created a Date column in Excel, and using the date format in English(Canada):

date format in Canada.PNG

After connectng and transform the table in Power BI, the data type was specified as Text. Because the default locale of my Power BI  is English(United States) in which date format is mm/dd/yyyy:

default locale.PNG

 

So in this case, please right-click the column --> Change Type, select "Using locale", then the type will be changed to Date successfully.

using locale.PNG

At last, apply all changes--> Click the Date column in Field pane--> Select Column tools-->Format it as dd/mm/yyyy:

Format date.jpg

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

Anonymous
Not applicable

Yikes. If modern software/systems need all these steps to understand a date that's a mark of poor design. 

 

Thanks for your help. 

Anonymous
Not applicable

I resolved the problem - the date formatting I was using in Excel was incorrect. I used the "Text to Columns" tool to fix the problem. 

 

Apparently using the Data Type selector in Excel has no effect if the cells come from a csv file.  

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

You can use Date instead of Date Hierachy, check the field

Vera_33_0-1624321438539.png

 

Anonymous
Not applicable

Yes, I've tried this but it doesn't work when filtering. The dates will display as intended, but they don't filter propoerly. 

Hi @Anonymous 

What do you mean by it not working when filtering? How did you filter? Filter Pane, slicer? Can you provide examples?

Anonymous
Not applicable

Filtering... as in using a slicer, filter pane... the problem is not the method of sorting, the problem is Power BI confusing dd/mm/yyyy with mm/dd/yyyy. In the exmples provided I have predefined how the data is laid-out in Excel, but when importing that data Power BI reads it backwards. 

 

I solved the problem by reversing the mm/dd... but it begs the question as to why the formatting feature in excel even exists at all. 

 

The problem: the steps outlined in this article have no effect on date formats when they carry over to Power BI... 

 

Format a date the way you want - Office Support (microsoft.com)

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.