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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to turn a column into a date type if it has 2 different date patterns?

Hello everyone,

I have a column that has dates of different types.
Example: 01/15/2020 and 1/15/20


When I try to pass this column to the date type, PowerBi shows rows with an error, because it is unable to convert all the rows in this column to date, due to the difference in the pattern in the dates. How can I work around this problem?

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Is your issue solved now?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Ashish_Mathur
Super User
Super User

Hi,

I don't think it is because of date of different format.  I think it is because of the entries which look like dates are not dates at all.  If your systems settings are set to dd/mm/yyyy format, then 1/15/2020 will not be recognised as a date at all.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
NamishB
Post Prodigy
Post Prodigy

Hi @Anonymous : To me this looks like data cleansing/Formatting issue. You might first need to clean and analyse your data

Easy way to do is in Power Query Mode > Select Table > View > Enable Column Distribution, Enable Column Profile and Enable Column Quality

Then you will need to fix any errors with the data. M code will be generated in the backend

 

Unfortunately there is no other way of automating data cleansing, Not atleast i am aware of.

 

Hope this helps.

 

Cheers,

-Namish B

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.