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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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