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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Mederic
Post Patron
Post Patron

Message "DataFormatError"

Hello,
I have a range named "Tab" with dates in columns,
After some transformations, if I change the column "Attribute" to date type, I have a column with errors.

How to correct the last step to transform this column in date ?
Thanks in advance
Regards

 

 janv-23févr-23mars-23avr-23
Name94217478
A65573784
B54383029
C23239092
D68628457

 

 

let
    Source = Excel.CurrentWorkbook(){[Name="Tab"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}, {"Column4", type any}, {"Column5", type any}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Column1"}, "Attribute", "Value"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Attribute", type date}})
in
    #"Changed Type1"

 

 

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

Hi, @Mederic . Feed Power Query with correct date representation in "MMM-yy" format. As far as I know in "fr-FR" locale the date must be like "janv.-23", not "janv-23" and so on.

View solution in original post

2 REPLIES 2
Mederic
Post Patron
Post Patron

Hello @AlienSx ,

Thank you for your message and sorry for the late reply.
I hadn't thought about the regional settings, indeed the 2 steps below work and solve the problem
thanks again

Regards

#"Changed Type with Locale" = Table.TransformColumnTypes(#"Unpivoted Other Columns", {{"Attribute", type datetime}}, "fr-FR"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Changed Type with Locale",{{"Attribute", type date}})

 

AlienSx
Super User
Super User

Hi, @Mederic . Feed Power Query with correct date representation in "MMM-yy" format. As far as I know in "fr-FR" locale the date must be like "janv.-23", not "janv-23" and so on.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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