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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

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
v-rongtiep-msft
Community Support
Community Support

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
v-rongtiep-msft
Community Support
Community Support

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

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.