Reply
pigsinblankets
Helper II
Helper II
Partially syndicated - Outbound

Data type mismatches

Good Afternoon, 

 

I have randomly received an error message regarding data type mismatches, no data types have been changed in the data source or in BI Desktop and this has never happened before, does anyone know what can randomly cause this error?

 

I have gone through all the columns and reassigned all the data types and it still shows an error shown below - any help would be much appreciated 🙂 Thank you! 

 

= let
tableWithOnlyPrimitiveTypes = Table.SelectColumns(Source, Table.ColumnsOfType(Source, {type nullable number, type nullable text, type nullable logical, type nullable date, type nullable datetime, type nullable datetimezone, type nullable time, type nullable duration})),
recordTypeFields = Type.RecordFields(Type.TableRow(Value.Type(tableWithOnlyPrimitiveTypes))),
fieldNames = Record.FieldNames(recordTypeFields),
fieldTypes = List.Transform(Record.ToList(recordTypeFields), each [Type]),
pairs = List.Transform(List.Positions(fieldNames), (i) => {fieldNames{i}, (v) => if v = null or Value.Is(v, fieldTypes{i}) then v else error [Message = "The type of the value does not match the type of the column.", Detail = v], fieldTypes{i}})
in
Table.TransformColumns(Source, pairs)

1 ACCEPTED SOLUTION
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @pigsinblankets ,

This issue appears when your data structure changes and data type conversion failed.(due to data type not matched) Can you confirm these files has same data structure?(e.g. data type, field name, separator... )

 

You can try In Query Editor, right-click the column and use Replace Values.


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

 

I have also found similar posts, please refer to.

Solved: expression.error the type of the value does not ma... - Microsoft Power BI Community

Solved: Data rows error - Microsoft Power BI Community

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @pigsinblankets ,

This issue appears when your data structure changes and data type conversion failed.(due to data type not matched) Can you confirm these files has same data structure?(e.g. data type, field name, separator... )

 

You can try In Query Editor, right-click the column and use Replace Values.


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

 

I have also found similar posts, please refer to.

Solved: expression.error the type of the value does not ma... - Microsoft Power BI Community

Solved: Data rows error - Microsoft Power BI Community

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)