Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
16 - Nebula
16 - Nebula

Hi @PoliteGolite301991  a more scalable solution would be to use 

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

 

 

OllieClarke
16 - Nebula
16 - Nebula

Apologies, edited after fat thumbing it

Labels
Top Solution Authors