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
Mengerdahl
Frequent Visitor

Date - Wrong year displayed (formatting problem)

Second formatting problem I cant solve today means second thread here today.. As earlier I seem to get stuck on getting the right format for my columns of the dataset. Im using Swedish settings on my PC if that matters for the date format. Just started working with PowerBI so im really just trying to understand the basics. 

 

Im using this dataset from Kaggle with orderdata. It shows orderdata from 2010 and 2011. An example of a date in the set is 04/01/10 00:00:00. where 10 is year. Not sure if 04/01 is mm/dd or dd/mm. 

 

When I add this file to PBI it shows as this:

Mengerdahl_0-1707588076551.png

It correctly identify the column as date but the format is all wrong. It identifies 04 as year and adds 20 for the year 2004 where its suppose to mean 2010. 

 

I have tried chaning to Locale US and it shows like this. Not much better..

Mengerdahl_1-1707588303815.png

Im super confused about this and different formats in general (more and more after today..) 

Does anybody have an idea what to do and if there are any settings I should do to prevent this from happening?

 

5 REPLIES 5
Mengerdahl
Frequent Visitor

So im still having this problem with several different datasets. I just tried to use this dataset

which only lists YYYY in the year column. Shouldn´t be a problem, right? Wrong! 😞 

 

Skärmbild 2024-02-15 191210.png

 

5dffcc75-7346-40f1-a0d3-7f09e6a07b81.png

Skärmbild 2024-02-15 191253.png

ppm1
Solution Sage
Solution Sage

One way to do it would be to keep it as text at first, then do a Text Before Delimiter step (transform tab, extract pull down) with a space as the delimiter. This will remove the 00:00:00 and you should be able to just convert it to Date type from there.

ppm1_0-1707609679972.png

 

Pat

Microsoft Employee

Thank you. It remove the 00:00:00 but still formats the year wrong. 

 

Skärmbild 2024-02-11 075133.png

az38
Community Champion
Community Champion

Hi @Mengerdahl 

where exactly did you try to change local?

There are 2 places - Global and Current File local settings

 

With current file local settings ENglish (United States)  04/01/10 00:00:00 was recognized as 2010 year for me


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi!

Good question 😉 I tried to change this in Power query when loading the file. Not sure if this is the right way then?

Skärmbild 2024-02-10 205021.png

 

Skärmbild 2024-02-10 205412.pngSkärmbild 2024-02-10 205421.png

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.