Free Trial

Alteryx Designer Desktop Discussions

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

How to create groups <= 20

TOzirsky
7 - Meteor

Will someone please let me know what tools to use with Designer Desktop to take a file of 1000’s of accounts with greater than 20 email addresses per account and narrow it down to 20 email addresses per account using specific fields in the data set to narrow it down to the 20. And if the highest priority field has more than 20 email addresses then randomly select 20 email addresses and repeat for the next prioritized field until reaching 20 email addresses per account.
Thanks,
Tim

10 REPLIES 10
Qiu
21 - Polaris
21 - Polaris

@TOzirsky 
I think we will need a sample set of input and out data.

TOzirsky
7 - Meteor

Thanks for your help. I have attached a data sample.

Qiu
21 - Polaris
21 - Polaris

@TOzirsky 
Thank you for sharing the data file.

What will be definition for "Priority"? can you kindly elaborate?

TOzirsky
7 - Meteor

The fields to prioritize who to add start in column C, ERM Contact num, i.e. if the field value in column C is 1 include it in the list of email addresses for the account. If there are 2 email addresses for the account with a 1 in column C then the total email addresses for the account is 2 and I need 18 more. So look at the column D and do the same until you get to 20 email addresses for the account.

Qiu
21 - Polaris
21 - Polaris

@TOzirsky 
Hope I did not do anything wrong and it turns out to be a very interesting one.

I had to go through a lot more steps for the Random Sampling as per your request.

0227-TOzirsky-1.png0227-TOzirsky-2.png0227-TOzirsky-3.png

PangHC
12 - Quasar

@Qiu i think random + sort + sample will do the similar result?

 

Screenshot 2024-02-27 180107.png

Qiu
21 - Polaris
21 - Polaris

@PangHC 
Now I feel shamed 😂
Yours is some smart.

 

I was thinking I was doing something wrong.

TOzirsky
7 - Meteor

I used a Join to bring in all the attributes from the Input file. This works great.
Thank you very much! 

Qiu
21 - Polaris
21 - Polaris

@TOzirsky 
I am thinking to submit this as a weekly challenge idea. would it be ok?

Labels
Top Solution Authors