简体   繁体   中英

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 "%"

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('%0.2f%%', col)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM