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 Hashadapu,
Thanks for the information above, it's valuable. I’m encountering an issue with one of the columns, as shown in the attached screenshot. Could you please take a look and help me figure out what's going wrong?
Thanks for the support and information in advance!
Regards,
Sai Akash
Hi Sai_Akash , thank you for reaching out to the Microsoft Fabric Community Forum.
Based on the screenshot, the issue is likely caused by hidden non-numeric values in the "id" column, even though it visually appears valid. Please check for error rows, data type mismatch and hidden charactere including hidden spaces,
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.