Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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 #25: Creating Merchant Combos

dillon_bok
8 - Asteroid
Spoiler
Week 25.PNG
danrh
13 - Pulsar
 
danilang
19 - Altair
19 - Altair

 My solution

Spoiler
5 tools! Cross join and filter do the heavy lifting

solution 25.png

Dan

OldDogNewTricks
10 - Fireball

Attached are my solutions.

 

I took 2 different approaches:

Spoiler

challenge_25_completedScreen.jpg


Solution 1 creates similar results, though more accurate, than the provided solution.  Useful for seeing the pairs user by user.
challenge_28_completedScreen_Sol1.jpg


Solution 2: Market basket approach.  More useful if you are going to create association rules for these businesses in general across multiple users.

challenge_28_completedScreen_Sol2.jpg

 

 

Kenda
16 - Nebula
16 - Nebula
Spoiler
Much like @JoshKushner, I did not like the fact that the provided output had extra null values for Merchant#. I created a couple variables (n!, k!, and (n-k)!) in order to calculate the number of combinations that should be allowed per count. Note this only works if there are 5 or less merchants, but there is no factorial formula, so I had to make it work. In the end I've got the same output minus a couple rows.
25.2.PNG25.PNG
SGriggs
7 - Meteor

Attached

kat
12 - Quasar
Spoiler
Challenge #25.PNG
MarMu
8 - Asteroid

 

Managed to do a small 5 tool solution.

I don't agree with the provided solution as all one purchase userID's appear in Merchant2 and with blank Marchant1. In my oppinion it should be opposite in accordance with Input data.

 

Spoiler
challenge_25_start_file_MarMu.png
OllieClarke
15 - Aurora
15 - Aurora

I'm not 100% on why the final formula tool in my solution is necessary, but hey ho

Spoiler
Challenge 25.PNG

 

KOBoyle
11 - Bolide

Solution attached. I am puzzled by the answer. I'm not sure what a pairing with a <null> merchant represents. I'm not a statistician, so I'm curious to know if correlation with Null is meaningful? Anyway, I filtered nulls out leaving 65 pairings across all users.