We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
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

AliMc7
6 - Meteoroid

Really wanted to try solving this with an iterative macro, as part of prep for taking the Advanced cert this week. Got there in the end, but not very happy about needing 2 macros - one to look for the closest Prime down from the input # and one for the closest Prime up. Think this could be a lot more elegant, but it does work at least. Thanks!

 

Spoiler
Solution
#79_Prime numbers app_Ali solution.PNG

Iterate down
#79_Prime numbers app_IterateDown_Ali solution.PNG

Iterate up
#79_Prime numbers app_IterateUp_Ali solution.PNG
cmoussa
8 - Asteroid

WF.png

 

martinson
11 - Bolide

Used an iterative

Cheers,
martinson

LinkedIN

Bulien
trizi
7 - Meteor

Probably not the easiest way, but I'm kind of proud of this :))

 

imagem_2025-02-13_124324859.png

ntakeda
12 - Quasar

I solved in Japanese Weekly.

barrymoe
8 - Asteroid

Got it!

 

Great test

JBevan89
8 - Asteroid

Great Challenge

RebekaMazuchova
8 - Asteroid

It took me some time and maybe it's not the most effective approach, but it gets the work done, and that's what I was going for!