Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 1 (BaseA Style)

MeganBowers
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 1 of the Advent of Code - https://adventofcode.com/2024/day/1

90 REPLIES 90
mmontgomery
11 - Bolide
11 - Bolide

D1

Spoiler
It a straight forward problem so I solved it on the raw data instead of the sampleday1_mm.png
kelsey_kincaid
12 - Quasar
12 - Quasar

Nice warmup today! 

Spoiler
 

Wishing I'd used the new Rank tool from 24.2! 

2024_Day1_KelseyKincaid.png

geoff_zath
Alteryx
Alteryx
Spoiler
AoC_2024_day1.png

clmc9601
13 - Pulsar
13 - Pulsar

Yay for a gentle start to the AoC season! I'm so excited that AoC is finally here!!🤩

 

 

Spoiler
 

This is the ONLY use case in which I accept "Join by Record Position" as a valid configuration of the Join tool. Even here, it's shorthand. A more robust method, in my opinion, is to assign record IDs and use that as the join key.

 

2024-11-30_23-16-19.PNG

 

matthewblandford
8 - Asteroid

Nice little warmup to start the month! Small enough to just load the raw data into the workflow itself.

CoG
14 - Magnetar

Simple yet great start to AoC 2024! This was a great warm up for what I know is to come.

 

Data Prep:

Spoiler
Both parts of the problem for Day 1 required the data be split into 2 independent columns. This is done quite easily with Text to Columns, Formula, and Select Tools:

Data Prep.png

Part 1:

Spoiler
Once the data is prepped, part 1 is almost trivial. Sort both sets of data, then Join together again, Ensure that proper data types for both fields, Compare with Formula Tool, and aggregate with the Summarize for the final answer!

Part 1 Section.png

Part 2:

Spoiler
For Part 2, we only need the count for each value in the second column, so we will immediately aggregate. Now, when the Join is performed (by record position for brevity), we will have the count of all values in the second column for every record in the first column (precisely what the problem calls for). The Formula Tool will again calculate our Similarity metric, and the Summarize Tool will provide us our answer!

Part 2 Section.png

Happy Solving to all others participating. I'm super excited for the rest of the days, so bring it on!

gawa
16 - Nebula
16 - Nebula

AoC 2024 has just started!

Spoiler
Part1: To align two columns based on their position, 'Join by Record Position' is straightforward way, instead of putting Record ID for each and join by Record ID field.
Part2: As Left and Right columns has 'Many-to-Many' relationships, by joining these columns, number of rows will increase based on its cardinality. Just summing up number of Left columns will match the answer(no need of multiplying values).
image.png
JoshuaB
Alteryx
Alteryx

Seeing a lot of the same solution ideas! Well done. Such a great Alteryx type of puzzle! 

 

 
Spoiler
2024-12-01_00-34-03.png2024-12-01_00-34-03.png
Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
Carolyn
12 - Quasar
12 - Quasar

After being peer pressured to solve Alteryx on a Saturday night, I have Day 1 complete. I'm glad this wasn't horrible!

 

Spoiler
2024-11-30_21-43-46.png
Labels
Top Solution Authors