# Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

## Challenge #144: Secret Santa Assignments (BAH HUMBUG!)

Highlighted
5 - Atom

@KyleCollins wrote:

Got the answer as shown in the output, but this was assuming that everyone was giving to and receiving from the same person. Wouldn't a true secret santa have 50 random pairings?

Great Point! If your match is also your Secret Santa, it's not much of a secret, is it? I might need to recreate my workflow

UPDATE: Here's my updated workflow. This will provide 50 unique results, randomized with every run, and the "scroogieness" will never be greater than 13.

Spoiler

Highlighted
6 - Meteoroid

As bsanson points out, pairings aren't very secret if you know the person you're gifting to is your secret santa.  The best answer is 50 unique rows, not 25 pairs.  And each run in this module creates new pairs.

Spoiler

Highlighted
Alteryx Certified Partner

My first challenge in a long time - good to be back!

Spoiler

Highlighted
5 - Atom

My first submitted challenge, this was fun!

Highlighted
7 - Meteor

Highlighted
8 - Asteroid

Merry Christmas! Here's my solution:

Spoiler
First time trying out the count tool - will have to remember that one!

Highlighted
8 - Asteroid

Very fun challenge!  I actually took a slightly different approach than the solution that wasn't really "Secret" Santa, since each person knew who they would receive a present from.  My workflow instead creates 50 unique pairs (sometimes there will be duplicated pairs, but it would be by chance through random number generation).

Spoiler

Highlighted
8 - Asteroid

This is my FIRST challenge!!! So fun!!!

Highlighted
9 - Comet

I created two very simple solutions, one that generates 25 Secret Santa pairs that are assigned to each other, and one that assigns a truly Secret Santa for each of the 50 people on the list.

Spoiler

Highlighted
11 - Bolide

This one was pretty fun! I did it both ways (method #1: simple match with 25 pairs, and method #2: secret match with 50 unique pairs). I may have gone overboard on method #2, but wanted to ensure unique pairs (with no givers/receivers buying for each other), while also minimizing the net scrooginess.

Spoiler
Outer workflow:

Iterative macro:
The macro picks a giver in order of increasing scrooginess (randomized within each scrooginess score). Then, the macro picks from remaining available receivers,  in order of decreasing scrooginess (randomized within each scrooginess score). The macro iterates until everyone has been picked as a receiver. The macro picks without replacement, ensuring we get distinct pairs with no givers/receivers buying for each other, and also ensuring that we keep net scrooginess as low as possible.