Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

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

kmcdaniel
8 - Asteroid
Spoiler
screenshot_25.png
Parul_Kapoor
8 - Asteroid

Solution attached.

gracec97
8 - Asteroid
Spoiler
Challenge 25.JPG
Illya
8 - Asteroid

My solution. Not quite there but different to the standard solution and interesting enough to post, sometimes it's the journey that is the important bit (I would still use the standard solution for this sort of problem in future though).

 

jbrowne02
6 - Meteoroid

Interesting challenge. Easy to get the 77 lines but had to do some wacky rearranging at the end to match the solution.

JamesCameron
8 - Asteroid

My Effort

 

Spoiler
JamesCameron_0-1574351948514.png
sarahjohnson
8 - Asteroid
Spoiler
sarahjohnson_0-1574880130576.png
SueDonim
8 - Asteroid

This was trickier than I expected.  There's probably a simpler way.

 

Spoiler
Process:
- Transpose data on UserID and Count
- Extract the Merchant Number (the right-most digit of Name)
- Create StoreNum field and assign against Merchant Number such that 5 becomes 16, 4 becomes 8, 3 becomes 4, and 2 and 1 are unchanged
  -- This means that for addition of those numbers you will always get a unique combination
  -- In this case, it enables you to note that ABC | DEF is the same combination as DEF | ABC, so you can filter out the duplicate
- Join data onto itself so you have all combinations of Merchant1 and Merchant2
- Filter out instances where Merchant1 = Merchant 2
- Create field SumStore that is the Sum of the two StoreNums created above
- Sort by UserID (asc) and SumStore (asc)
- Multi-Row to flag duplicate (where for any UserID, SumStore has the same value as the previous record
- Filter out duplicates
- Sort data (probably unnecessary)
- Unique tool on UserID, Merchant1Value and Merchant2Value
- Where Merchant2Value is Null() swap record with Merchant1Value (solely for purposes of matching to official answer)
- Cleanup and sort

MySolution.PNG
sonyakasenkramer
8 - Asteroid
Spoiler
sonyakasenkramer_0-1575579141112.png
prozanini
8 - Asteroid