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

AliMc7
メテオロイド

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!

 

スポイラ
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
アステロイド

WF.png

 

martinson
ボリード

Used an iterative

Cheers,
martinson

LinkedIN

Bulien
trizi
メテオール

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

 

imagem_2025-02-13_124324859.png

ntakeda
クエーサー

I solved in Japanese Weekly.

barrymoe
アステロイド

Got it!

 

Great test

JBevan89
アステロイド

Great Challenge

RebekaMazuchova
アステロイド

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!