- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
84 | |
59 | |
59 | |
44 |
User | Count |
---|---|
180 | |
119 | |
82 | |
70 | |
54 |