Forum Discussion
OLE DB or ODBC error: [DataFormat.Error] We couldn't convert to Number
- 1 year ago
Hi Sai_Akash , thank you for reaching out to the Microsoft Fabric Community Forum.
Here are a few additional suggestions and clarifications to ensure consistent file imports with the correct transformations:
- Check Column Data Types in Power Query: Open Power Query Editor, Identify the column causing the issue, ensure it is correctly formatted as a Number (or the intended data type), If it contains mixed data types (text & numbers), Power BI may fail to convert them.
- Use the "Replace Errors" option in Power Query: Select the column, Go to Transform > Replace Errors and replace non-numeric values with a default value (e.g., 0 or NULL), Filter out or clean unexpected characters (e.g., spaces, commas, special symbols).
- Sometimes, leading/trailing spaces or special characters may cause issues. Use Trim, Clean, and Substitute functions in Power Query.
- Even though you’ve tested multiple formats (CSV, Excel, TXT), ensure all files have the same structure (column order & names), no headers are duplicated, Date formats are consistent.
- In Power Query, disable automatic type detection by removing the Changed Type step, manually setting types after cleaning the data.
- If you're loading multiple files from a folder import one file at a time to identify which file is causing the issue, compare problematic files with working ones.
- Sometimes locale settings can affect how numbers and dates are interpreted during import, ensure that locale settings match across all files being imported.
- Null values can sometimes cause conversion errors if not handled properly, use Replace Values or Fill Down options to handle nulls before converting data types.
If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.
Hi Sai_Akash , thank you for reaching out to the Microsoft Fabric Community Forum.
Here are a few additional suggestions and clarifications to ensure consistent file imports with the correct transformations:
- Check Column Data Types in Power Query: Open Power Query Editor, Identify the column causing the issue, ensure it is correctly formatted as a Number (or the intended data type), If it contains mixed data types (text & numbers), Power BI may fail to convert them.
- Use the "Replace Errors" option in Power Query: Select the column, Go to Transform > Replace Errors and replace non-numeric values with a default value (e.g., 0 or NULL), Filter out or clean unexpected characters (e.g., spaces, commas, special symbols).
- Sometimes, leading/trailing spaces or special characters may cause issues. Use Trim, Clean, and Substitute functions in Power Query.
- Even though you’ve tested multiple formats (CSV, Excel, TXT), ensure all files have the same structure (column order & names), no headers are duplicated, Date formats are consistent.
- In Power Query, disable automatic type detection by removing the Changed Type step, manually setting types after cleaning the data.
- If you're loading multiple files from a folder import one file at a time to identify which file is causing the issue, compare problematic files with working ones.
- Sometimes locale settings can affect how numbers and dates are interpreted during import, ensure that locale settings match across all files being imported.
- Null values can sometimes cause conversion errors if not handled properly, use Replace Values or Fill Down options to handle nulls before converting data types.
If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.
I am also getting this error combined with another one;
Cannot find table 'April 23 to February 25'. Cannot find table 'Input Tab (2)'. OLE DB or ODBC error: [DataFormat.Error] We couldn't convert to Number..
I dont know which column or table the error is referring to. This error shows when I am loading into Power Bi, and then doest show in Power Query. The strange thing is - this file was OK on Tuesday and then today I have opened it and it isnt! Please help!!