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

2 REPLIES 2
RodL
Alteryx Alumni (Retired)

Use a Generate Rows tool to create 80,000 records... 

Initialization Expression = 1

Condition Expression = RowCount <= 80000

Loop Expression = RowCount + 1

 

Then add a Formula tool creating a new field (e.g., "RandomAge") with the expression "RandInt(45) + 20".

 

The output from that will be 80,000 random ages between 20 and 65.

 

You can then just Join this to your members using "Join by Record Position" to append them to your existing records.

Bharath
8 - Asteroid

Hi RodL,

 

Thank you for helping me on this.

 

Thanks,

Bharath

Labels