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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
KeithRDH
New Member

Data Format incorrect when loading from an excel file

Hi Im getting really frustrate!! I have an excel file which is upoading to PowerBI one column is alphanumeric and is formated in excel as a TEXT and in Power query it is also formatted as TEXT but for some reason it still shows errors 

When looking at the error in Power Query and selecting one of the Error cells the message at the bottom of the screen reads "DataFormat.Error: We could not convert to Number." 

I dont want to convert to number that is why I formated the column as TEXT????

1 ACCEPTED SOLUTION

Try changing the original

{"Product Code", Int64.Type}

to

{"Product Code", type text}

and then hit close and apply. If the query does not error out you can remove the extra change type steps

View solution in original post

10 REPLIES 10
wstegemann
Frequent Visitor

Hi @KeithRDH,

 

Can you post your query from the advanced editor as well as a picture containing one of the error cells?

KeithRDH_0-1710345727928.png

This is the screen shot of the Power Query with error message at bottom. Sorry not sure what Advance editor is?

On the Home tab there should be an option called Advanced Editor under the Query heading. It basically shows all the code for your query without clicking on each step

KeithRDH_0-1710346189702.png

Thanks see screen shot of this...

Can you send the code for your original SalesOrders table? I believe this query is the error report, which you can remove

KeithRDH_0-1710346636638.png

Hows this?

Try changing the original

{"Product Code", Int64.Type}

to

{"Product Code", type text}

and then hit close and apply. If the query does not error out you can remove the extra change type steps

You Sir, are a genius. That worked perfectly. I've lost 3 hours of my life but at least I gained faith in humanity. Thank you so much!

No problem, you can also have Power BI apply this fix for you automatically in the future by having the original Changed Type step selected while changing your columns and selecting Replace Current when you are prompted

KeithRDH_1-1710346373596.png

Sorry, now showing all text.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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