Forum Discussion
SClarke501
4 years agoFrequent Visitor
Converting visible numbers to plain text
Bit of a strange one but I can't figure out how to do this in Power Query. I have a column of decimal numbers, where I need to differentiate between things like 1.1 and 1.10 (1.10 wants to be tre...
- Anonymous4 years ago
Hi SClarke501 ,
You can use Number.RroundUp() to convert 2.29999999 to 2.3.
And the new column can be changed to text type.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SClarke501
4 years agoFrequent Visitor
Sorry, I meant 2.2999999
ronrsnfld
4 years agoSuper User
It's not clear to me what exact rules you use to determine whether to Round a number, or leave it as one or more digits. However, I'd suggest initially setting the values to type text. Then, using an IF clause to determine the type of rounding required for the digits after the decimal, then using Number.ToText(Number.From(_),"0.0")) (or "0.00") to create the appropriate text string.