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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
fcerullo
Advocate I
Advocate I

DataFormat.Error: We couldn't convert to Number but I am using Text columns

 

I get this error in both PowerBI Desktop Query Editior, and in Excel Power Query, when I am merging two queries.

 

Each query only has a few columns and they are all formatted as Text. I have columns like "Part_No" and "Commodity", and there are no numeric columns at all in either query. (There are quantities and costs in the inital load of the data but I delete those colunms in earlier steps prior to the Merge step that I am talking about here). 

 

When I try to Expand the result, I get the error "DataFormat.Error: We couldn't convert to Number" and a specific part number. I have tried filtering that part number out of both queries but I still get the error.

 

I cannot figure out why it is trying to convert to Number when everything in both queries is formatted as Text.

 

Any solutions?

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@fcerullo 

Sometimes PowerQuery will try to help by adding a step of "Change Type" where it looks at the first 1000 rows and tries to determine if it is a number or text etc.  Did it add a step like that when you loaded your data from the source?  If so, you can just delete that step to stop it from trying to convert.

View solution in original post

7 REPLIES 7
Excel_john
New Member

Thanks all!

jdbuchanan71
Super User
Super User

@fcerullo 

Sometimes PowerQuery will try to help by adding a step of "Change Type" where it looks at the first 1000 rows and tries to determine if it is a number or text etc.  Did it add a step like that when you loaded your data from the source?  If so, you can just delete that step to stop it from trying to convert.

Thanks a lot!

Anonymous
Not applicable

This helped me aswell...thanks

I added a step to make the format Text on all columns of these 2 queries.

 

oh, I see what your saying JD, I will take that auto-created step out and then do my own transformation.

This worked!

The PQ was directing me to an error at a the Expand table step, but, it was actually caused earlier in my transformation.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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