Helpmedaddy
Helpmedaddy

Reputation: 17

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%

Upvotes: 0

Views: 539

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269953

For these numbers, you can use:

format_number(col, 2) || '%'

or printf():

printf('%0.2f%%', col)

Upvotes: 1

Related Questions