Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I have a column contains sometime numbers and other times text, it make error "Data format error, we couldn't convert to number".
i.e:
Cell 1 > 83
Cell 2 > Open
Solved! Go to Solution.
You need to make sure you're making the type conversion BEFORE any other conversions take place. It looks like you probably have 'Automatically detect data types' enabled and Power Query has put a conversion step in for you at the start of the query steps just after the source is imported.
Go to the top of your query steps and see if there's a Changed Types step already there. If yes, then select that step, change the type of your column to Text and, when prompted, choose to replace the step, rather than add a new one.
Pete
Proud to be a Datanaut!
Perfect. Glad that worked for you.
As an aside: Do NOT use Type Any in Power Query. You should always change your columns to explicit data types. It doesn't have to be done at the first step that we're talking about, but you should always ensure that all of your columns have an explicit data type by the end of the query to avoid causing yourself problems when you apply the query to the data model.
Pete
Proud to be a Datanaut!
You need to check if the previous step set the data type of this column to numeric type.
When you use the connector to read data from Excel file, it may guess your data type. If you want to keep all the content, you should manually set it to text type.
Hi @Moh_Ashraf in power query , add a custom column
= try Number.From([ColumnName]) otherwise [ColumnName]
Hi @Moh_Ashraf
You need to convert this column to Text type. If you then need to do statistaical functions/comparisons on just the numbers, you will need to use conditional elements in your calculations, something like this:
if try Value.Is(Number.From([YourColumn]), type number) otherwise false
then [YourColumn] * 10
else [column] // or null or whatever you want your escape value to be
Pete
Proud to be a Datanaut!
I changed the data type to text but actually still error.
I changed the data type to text but Actually, still not working
Hi @Moh_Ashraf ,
Thanks for reaching out to Microsoft Fabric Community forum.
Based on the screenshot i have done repro from end , i can able to change the data type as expected.
Once you have loaded the data , change the data type to "Text" as per the below screenshot:
Then Replace vlaues with reuqired data as shown in below :
The expected result as here :
Note : Ensure Data Type Change is Applied Properly.
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
I doesn't want to replace value, I need to keep the data as it is even if number or text.
What I meen is I didn't want to make calculations for number cells, I want power BI read the number as a text.
But when I change the column data type to Text, still give the same error in cells that have text "We couldn't convert to number".
You need to make sure you're making the type conversion BEFORE any other conversions take place. It looks like you probably have 'Automatically detect data types' enabled and Power Query has put a conversion step in for you at the start of the query steps just after the source is imported.
Go to the top of your query steps and see if there's a Changed Types step already there. If yes, then select that step, change the type of your column to Text and, when prompted, choose to replace the step, rather than add a new one.
Pete
Proud to be a Datanaut!
Yes, thats right,
I found another step for automatic change data type at first,
I found the column that I have a combined text and value is "int64. type" but I changed it to "Type any"
Thank you for support
Perfect. Glad that worked for you.
As an aside: Do NOT use Type Any in Power Query. You should always change your columns to explicit data types. It doesn't have to be done at the first step that we're talking about, but you should always ensure that all of your columns have an explicit data type by the end of the query to avoid causing yourself problems when you apply the query to the data model.
Pete
Proud to be a Datanaut!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |