Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Randomly select perticular number of rows per employee

nkrupabd
8 - Asteroid

HI ,

 

I have multiple Tickets per employee .

example employee A has 6 Tickets under him

               employee B has 100 tickets

               employee C has 2 ticket and So on

 

So is there a way where I can randomly pick 2 or 3 Tickets per employee.

 

Thank you.

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@nkrupabd 
We do have this Random 1 of N in the Sample tool. I think we can use it.

RandomSample.PNG

Emmanuel_G
13 - Pulsar

@nkrupabd 

 

Find in attachement the way of doing that.

 

Step 1 : I generate random numbers for each line.

Step 2 : I sort them and then I pick the last 3 rows ( You can also take the first 3 ).

 

Let me know if there is and issue and do not hesitate to mark this answer as solution if it helped. 🙂

 

Emmanuel_G_0-1664357932107.png

 

 

Labels