![](/img/trans.png)
[英]How to strip of the trailing decimal point only if it has no values after the point
[英]How to keep the trailing zeros after decimal point
所以我的 Alteryx 輸出會截斷小數點后的尾隨零,這使我很難應用諸如添加“%”之類的字符串操作
所以像這樣:
Alteryx Column
38.5
23.75
27
Current Output by adding "%"
38.5%
23.75%
27%
Desired Output
38.50%
23.75%
27.00%
對於這些數字,您可以使用:
format_number(col, 2) || '%'
或printf()
:
printf('%0.2f%%', col)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.