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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
judinwa
New Member

Formatting a Date Column with mixed data type

Hi team, I am new to PowerBI and excited to join this great community.

I am working on a project which has some date columns formatted weirdly see sample below.

judinwa_0-1725030920598.png

I have tried to format the column to a date format but keep getting error for some of the values in the column (see screenshot below)

judinwa_1-1725031247954.png

I can format the column in excel before importing it to power query but I was wondering if there is a way to format it directly in power query.

I will like to know if it is possible to format the column directly in power query and suggestions on how to do that, thank you

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

Given your displayed data,

ronrsnfld_0-1725132498226.png

you merely need to specify the culture as one that has a format of dd-mm-yyyy. It would appear that your computer's default date format is MDY and the mismatched values are in DMY format.

 

eg:

 

 

let

//replace Source line with your actual data source
    Source = Excel.CurrentWorkbook(){[Name="Table5"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"issue_date", type date}},"en-150")
in
    #"Changed Type"

 

 

"en-150" is the culture code for Europe, although others will work as well.

 

ronrsnfld_0-1725132408990.png

 

Note that the dates above are in MDY format which relates to my Windows Regional Settings.

View solution in original post

4 REPLIES 4
ronrsnfld
Super User
Super User

Given your displayed data,

ronrsnfld_0-1725132498226.png

you merely need to specify the culture as one that has a format of dd-mm-yyyy. It would appear that your computer's default date format is MDY and the mismatched values are in DMY format.

 

eg:

 

 

let

//replace Source line with your actual data source
    Source = Excel.CurrentWorkbook(){[Name="Table5"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"issue_date", type date}},"en-150")
in
    #"Changed Type"

 

 

"en-150" is the culture code for Europe, although others will work as well.

 

ronrsnfld_0-1725132408990.png

 

Note that the dates above are in MDY format which relates to my Windows Regional Settings.

Hi @ronrsnfld , thank you so much, your solution worked 😁

Ahmedx
Super User
Super User

pls try

Screenshot_3.png

lbendlin
Super User
Super User

Format the column as integer first, and then as Date.  Choose "Add Step" rather than "replace"

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.