How to change integers into decimal numbers in Excel Power Query? When new application was creating, I’ve noticed that values from external database should be decimal numbers, but they wasn’t.
Some time ago I’ve participated Power Query training in my current company. Training was done by Bartosz Czapiewski. It was a good training. Currently I’m working on application where VBA code, Power Query and directly connection to external database are joined together. Why Power Query? Assumption is to run code faster without code error.
While downloading data from external database (directly connection via Excel tools) values that should be decimal numbers, they aren’t decimal numbers. For example weighting result is 950,50 kg while after data downloading result is 950500. Completely different value. I’ve noticed that three last digits are the decimal numbers – I’ve used it.
In Excel sheet following functions might be used “left”, “right”, “len” and “join text” to get proper result (result has to be multiply by 1 to change text into number) this is decimal numbers. The same functions have been used by me in Power Query
Added new column with Power Query functions:
= Text.Start(Text.From([masa]), Text.Length(Text.From([masa]))-3)&”,”& Text.End(Text.From([masa]),3)
Result is still treated as text because of used text functions. Therefore column format should be change into decimal numbers – it might be rounded.