[英]How to keep the trailing zeros after decimal point
So my Alteryx output truncates trailing zeros after decimal point which makes it difficult for me to apply string operations like add "%"所以我的 Alteryx 输出会截断小数点后的尾随零,这使我很难应用诸如添加“%”之类的字符串操作
So something like this:所以像这样:
Alteryx Column
38.5
23.75
27
Current Output by adding "%"
38.5%
23.75%
27%
Desired Output
38.50%
23.75%
27.00%
For these numbers, you can use:对于这些数字,您可以使用:
format_number(col, 2) || '%'
or printf()
:或printf()
:
printf('%0.2f%%', col)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.