Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 4 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 4 of the Advent of Code - https://adventofcode.com/2023/day/4

48 REPLIES 48
PangHC
12 - Quasar
Spoiler
Screenshot 2023-12-04 155210.pngScreenshot 2023-12-04 155217.png
AkimasaKajitani
17 - Castor
17 - Castor

My solution.

 

Part 1 was very easy. But it took so much time for part 2 because I didn't understand the question correctly and wasted my time. But I am satisfied in the execution time(less than 1 sec). 

 

Spoiler
スクリーンショット 2023-12-04 170541.png


スクリーンショット 2023-12-04 170608.png

 

 

IraWatt
17 - Castor
17 - Castor

My first macro in AoC. Definitely learned a bit from the challenge today.  

Spoiler
Day 4.PNGDay 4 Macro.PNG
Ladarthure
14 - Magnetar
14 - Magnetar

My solution with a quick working macro

Samantha_Jayne
Alteryx
Alteryx
Spoiler
Day 4.png
Only have time for star 1 at the moment and I have dance later... so may have to catch up on this one. Will update my pic & file when I do.
Samantha Clifton
Alteryx
#alteryxrocks
caltang
17 - Castor
17 - Castor
Spoiler
image.png

No luck with a non-macro solution... tried doing a many-to-many join but the idea fell flat. Would love to see a different appraoch.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
PangHC
12 - Quasar

non-macro version.

I just random test and boom, hit the result.

Spoiler
then use multiple-rows formula and get above row based on the max winning number (which is 10).
(change the [count] to 1, as it just referred to original copy)
1+
iif([Row-1:Sum_match]>0,[Row-1:Count2],0)+
iif([Row-2:Sum_match]>1,[Row-2:Count2],0)+
iif([Row-3:Sum_match]>2,[Row-3:Count2],0)+
iif([Row-4:Sum_match]>3,[Row-4:Count2],0)+
iif([Row-5:Sum_match]>4,[Row-5:Count2],0)+
iif([Row-6:Sum_match]>5,[Row-6:Count2],0)+
iif([Row-7:Sum_match]>6,[Row-7:Count2],0)+
iif([Row-8:Sum_match]>7,[Row-8:Count2],0)+
iif([Row-9:Sum_match]>8,[Row-9:Count2],0)+
iif([Row-10:Sum_match]>9,[Row-10:Count2],0)​

then sum the count2

Screenshot 2023-12-04 181313.png

 

DataNath
17 - Castor
17 - Castor

Day 4 done and dusted! Took me a little while to debug my part 2 macro but we got there in the end!

 

Spoiler
Day4.pngDay4Iterative.png
mbarone
16 - Nebula
16 - Nebula

Part I only.  Hope to work on Part II without a macro (not sure it's possible, but going to try) later.

Spoiler
2023-12-04 09_08_00-Alteryx Designer x64 - Day04.yxmd.png

Part II:  Gave up on the non-macro approach, so here it is with the macro.

Spoiler
2023-12-04 11_46_00-Alteryx Designer x64 - Day04_Part2.yxmd_.png

 

rachel_k
Alteryx Alumni (Retired)

Perfect use case for a simple iterative macro - I feel good getting this one done quickly after I was a mess on yesterday's puzzle!

Spoiler
day4.png
Labels
Top Solution Authors