We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

assigning random numbers for records

Bharath
8 - Asteroid

Hi,

 

I have 80000 members (records). I have to assign them random between the age of 20 -65. how to do it in alteryx ? can anyone please help me with that ?

 

Thanks,

Bharath

3 REPLIES 3
JoeM
Alteryx Alumni (Retired)

Try using the following expression inside a formula tool: RandInt(45)+20

MarqueeCrew
20 - Arcturus
20 - Arcturus

I'll bite.  Why are you assigning them random ages?

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
vishwa_0308
11 - Bolide

please try this..

   

take a formula tool and make a column "age" then put formula randInt(65) which will create a random number ranges 0-65.

then again put below formula using same field/new field:

 

"if [age]<10 then [age]+20 elseif 

[age]>10 and [age]<=15 then [age]+10 elseif
[age]>15 then [age]+5 else [age] endif"

 

Capture.JPG

after this you will get random ages within 20-65.

Labels
Top Solution Authors