ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #415: Efficient Resource Distribution Using Macros

RWvanLeeuwen
Bolide

@AYXAcademynever mind!

 

Here's my take on this topic.

 

Without macros and without any issues on supply/demand

Révélation
if you ask for the most, you will get the least.... with that principle I added priorities for regions and periods. for resources I did it the other way around because high priority resources are in high demandif you ask for the most, you will get the least.... with that principle I added priorities for regions and periods. for resources I did it the other way around because high priority resources are in high demandafter crossjoining all resources with all region/period data, I filtered and sampled to keep only one resource*period row.... Apparently all needs can be metafter crossjoining all resources with all region/period data, I filtered and sampled to keep only one resource*period row.... Apparently all needs can be met

 I even built a super ugly dashboard to check whether this result is correct, and it seems to be:

Révélation
 
RWvanLeeuwen
Bolide

dashboard image cannot be uploaded somhow, let's retry

Révélation
ugly but is shows resource priority and resources + the regions where they can be allocatedugly but is shows resource priority and resources + the regions where they can be allocated
alacoume
Comète

A solution without macro:

balajilolla2
Boule de feu

 

Révélation
Solution Attached

Screenshot 2024-02-28 074453.jpg

 

 

AUX
Atome

There is no mentioning in the challenge about the optimization needs for the resources.

 

Révélation

Based on the provided output, it looks like the resources are assigned period by period to meet resources needed. So it should be straightforward to use Resources column and ResourcesNeeded column to get the assignment for each period.

Screenshot 2024-02-28 121645.png

 

kelvin_law1
Comète

Here is my solution using Batch Macro:

 

Révélation
415Workflow.png
415Macro.png

 

 

olga_strubbe
Bolide

A neat challenge, thank you, @DataNath  and @Luke_C!  It gave me a hand at batch macros with the pieces finally starting to come together :)

I would like to give a credit to @AkimasaKajitani  as being my inspiration in solving this challenge.  Thank you, @AkimasaKajitani  - I liked the fact that you've created a Row Position field to align the number of resources needed for each region with Row Position - this made it an easier way to solve it for me. 

 

Workflow: 

2024-02-29_10-33-10.png

 

Batch Macro: 

macro.png

 

 

ksukhraj
Météoroïde

This is very well structured and easy to understand. Thanks for sharing.

RashedDS
Astéroïde
Révélation
415.JPG

ggruccio
ACE Emeritus
ACE Emeritus

An iterative approach to building the iterative macro because it took a few times to get all the logic.  Once everyone was matched, I then checked against the original data to find out if all were assigned.

 

Révélation
415a.png415b.png