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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Johannf
New Member

DataFormat.Error: We couldn't convert to Number.

When trying to convert a column containing only numbers, I get an error "DataFormat.Error: We couldn't convert to Number."

I have searched and replaced the column for spaces and replaced it.

I have searched and replaced the column for all special characters, as listed in the advanced search and replace dialog.

Johannf_0-1693908481817.png

 

Our decimal separator is set to a full stop.

 

 

 

 

 

When right clicking clicking on Decimal Number, I get the error.

Johannf_1-1693908570480.png

 

Johannf_2-1693908621724.png

 

Here is an example of the error and that data.

Johannf_3-1693908667725.png

 

Please help.

 

 

 

1 ACCEPTED SOLUTION
Johannf
New Member

If I convert the datatype from text to decimal by clicking on the data type block, than clicking on "1.2 Decimal Number" I get the error.

Johannf_0-1693999914954.png

 

However, if I click on the last option "Using Locale...", then select on "Decimal number" and then select  "English (United States)" It works. If I select any other locale, it does not work. This seems to be a but in Power query.

Johannf_1-1694000011432.png

 

 

View solution in original post

5 REPLIES 5
Johannf
New Member

If I convert the datatype from text to decimal by clicking on the data type block, than clicking on "1.2 Decimal Number" I get the error.

Johannf_0-1693999914954.png

 

However, if I click on the last option "Using Locale...", then select on "Decimal number" and then select  "English (United States)" It works. If I select any other locale, it does not work. This seems to be a but in Power query.

Johannf_1-1694000011432.png

 

 

mlsx4
Memorable Member
Memorable Member

Hi @Johannf 

 

As I commented previously I think the problem is the dot. For some reason, Power BI is considering it as miles, then when you try to convert if the value is 226.39, Power BI is trying to put  226390 so it gives an error due to the missing 0.


If you replace it by comma you should be able to convert to decimal value too.

Yes, it can convert it to decimal when I replace the dot with a comma. That is how I used to do it, but that is not the best way. Our decimal separator is a dot. The conversion using locale is a better solution.

mussaenda
Super User
Super User

Hi @Johannf ,

 

what does your data look like before changing the type to decimal?

mlsx4
Memorable Member
Memorable Member

Hi @Johannf 

 

Could you try to change "." by ","? I think it is the problem

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.