cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
freshpeper
Helper I
Helper I

How to clean the different date format in same column

Dear Community, 

I have a column with date format like these;

the Apr-2019 is the same as Apr-19,  which is month and year.  but I want the date to show the same format in power bi. I have more than 6000 rows, dont want to manual clean it. can someone show a quick way to change it? thank you.

rowdateattribute
row1Apr-2019sales
row2Apr-19forecast
row3May-2019sales 
row4May-19forecast
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@freshpeper , Try to change the data type to date. I think it will convert it into data after that you can choose any format you want from the column property.

 

For me it became date by default at time of loading

 

or a new column like

if(len[date]) =6 , left([date],4) & "20"& right([Date],2), [Date])

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@freshpeper , Try to change the data type to date. I think it will convert it into data after that you can choose any format you want from the column property.

 

For me it became date by default at time of loading

 

or a new column like

if(len[date]) =6 , left([date],4) & "20"& right([Date],2), [Date])

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

@amitchandak  your code worked, also I found another way(may not be very technical solution), I replaced the - with /1/ to forth the format to the US date format like  Apr/1/19 or Apr/1/2019, 

thanks again

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.