Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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 #79: Find the Closest Prime Number

aplenos
8 - Asteroid
Spoiler
aplenos_0-1663505829330.png

 

acarter881
12 - Quasar

Here's my solution.

Spoiler
my_weekly_challenge_79_solution.png
olga_strubbe
11 - Bolide

 

Spoiler
olga_strubbe_0-1665159194660.png

 

  I used the same approach in solving the challenge as provided in the solution.  Learned a ton!  Thank you.

Divya_Bidarahalli
8 - Asteroid

Solved it

Pete_Rodgers
Alteryx Alumni (Retired)
Spoiler
I did it the long inefficient way with more lines to process than others, as sqrt approach caused my brain too much pain.  However I learnt some new functions thanks to reviewing the official answers - ABS() and mod().  borrowed some formatting to lay it out nicer and break up the logic.

Pete_Rodgers_0-1666607915691.png

This was a really good challenge, that had me scratching my head, more about the Prime calculations than macros!

FinnCharlton
13 - Pulsar
Spoiler
FinnCharlton_0-1667898169551.png

 

Just don't use a number over ~6 digits! Could definitely be improved to deal with bigger numbers.

Kinga
8 - Asteroid

Hi,

 

Please find my solution below,

 

Spoiler
Kinga_0-1667928774401.png

 

martinding
13 - Pulsar

 

Spoiler

79.png

97a.png

 

  

Reesetrain2
9 - Comet
9 - Comet

All,

 

I took the "R" Route!

Spoiler
Capture.PNG

AndrewHoData
8 - Asteroid

Created analytic app solution where it finds closest prime number < Number

Spoiler
AndrewHoData_0-1669427943707.png


Just for reminder for future me to remember to tick this box so that it'll show up in the analytic app results

AndrewHoData_1-1669427996813.png


Tested with other values to see if it works

AndrewHoData_2-1669428036130.png