March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have put the following values in a google doc:
The column is formatted into number in the google doc
latitude |
7.4064 |
7.6904 |
7.6904 |
5.3627 |
7.6904 |
I am however unable to transform it into a decimal number in power BI.
It says- Error: We couldn't convert to Number.
Please help me fix this.
Solved! Go to Solution.
Left-click on the heading of the column you want to convert from text to decimal. Click on the icon indicating the data type. Then instead of clicking on "1.2 Decimal value" click on the last item "Using Locale..." From the Data Type drop-down list select "Decimal Number". From the Locale drop-down list select "English (United States)". Only this locle works, the outers does not.
This has been solved a long time ago, but in case someone stumbles on this post looking for a solution, an alternative solution that I would prefer in such a case is making use of the optional Culture field of the TansformColumnTypes function. By adding "en-US" after de list of fields to modify, the "." will be parsed as the decimal separator. Example:
=Table.TransformColumnTypes(#"PreviousStep", {"MyTextColumn", type number}, "en-US")
Hi,
The process is very simple.. Go to the Query Editor and right click on the column and change the Type to the desired type.
We cannot convert the type from a whole number to decimal from a data view. enable the query editor and change it.
All the best!
Thank you Sujith.This solution worked for me
@purnima13 the problem is going to be some other text field possibly in your column are you sure its all decimals? i dont see why there would be a problem converting, otherwise there might be spaces trying doing a format clean and trim in power query
Proud to be a Super User!
@vanessafvg: The only values in the file is what you see.
I have tried cleaning and trimming and it did not work
Hi @Anonymous
It worked for me, thanks a lot!
Best regards,
Mihaly
@Anonymous: I can't believe this actually worked. Thank you so much.
But I still don't understand why, do you know?
Hi @purnima13,
I have not a single idea why a "," works and a "." does'nt, but it happened to me before and this solved it for me. That is how I knew.
Anyway glad it worked for you 🙂
Regards,
L.Meijdam
I had the same problem and i converted "." to "," and it worked . Eventually i found that it was due to my regional settings that "," was treated as the decimal separator . Once i changed the regional settings "." was working . Hope this helps
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
67 | |
54 | |
43 |
User | Count |
---|---|
203 | |
106 | |
98 | |
65 | |
56 |