Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Need to count Zeros as per number in alteryx

PoliteGolite301991
6 - Meteoroid

Hi Team,

 

Need help one below.

Please suggest.

 

I have a field with numbers and I need to concatenate number of zeros based on the number in that field.

Example:

 

Inputs:

NumberDecimals
21
21
31
31
31

 

 

Output:

 

NumberDecimal
2100 (If 2 then 2 zeros to be appended)
2100
31000
31000
31000
3 REPLIES 3
FrederikE
13 - Pulsar

Hey @PoliteGolite301991,

Screenshot 2023-10-20 181414.png

 

toString(Decimals)+Right("000000000000000000", [Number])

 

This formula should work.

OllieClarke
15 - Aurora
15 - Aurora

Hi @PoliteGolite301991  a more scalable solution would be to use 

PadRight(tostring([decimals]),length([decimals])+[number], “0”)

 

 

OllieClarke
15 - Aurora
15 - Aurora

Apologies, edited after fat thumbing it

Labels