Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Allocation Country wise with upper limit

pushpakmangal18
7 - Meteor

Hi, I have a problem statement as mentioned below :

 

I have a list of tasks, which needs to be allocated to users country wise. While allocating it is to be keep in mind that for every country, there is a designated primary user. If that user is not present, then it could be allocated to any random user who is present. Also, while allocating there is a upper limit of 100, it means that not more than 100 tasks could be allocated to a single user. Also, lets suppose, if total tasks are 200 and total available users are 4, then 200/4=50 i.e. not more than 50 tasks will be allocated to single user. 

 

Input : 

 

S.No.TaskCountry
1Task 1A
2Task 2B
3Task 3A
4Task 4A
5Task 5C
6Task 6B

 

CountryPrimary UserPresent
AUser 1Yes
BUser 2Yes
CUser 3Yes

 

Output : 

 

S.No.TaskCountryAllocation
1Task 1AUser 1
2Task 2BUser 2
3Task 3AUser 1
4Task 4AUser 3
5Task 5CUser 3
6Task 6BUser 2

 

I am mainly struggling with the limit check part, which is to be done dynamically while allocating it to a certain user. As there are total 6 tasks and 3 available users, so upper limit for any user is 2. As there are 3 tasks for country A, and thus 2 tasks allocated to User 1 and 1 task allocated to User 3. How to do all these allocations dynamically? 

1 REPLY 1
Raj
16 - Nebula

@pushpakmangal18 
this can be created 
just the data you provided is very small to apply the logic 
provide around 100 rows of data with someone unavailable as well to demonstrate the scenario

will be in better position to help.

Labels