Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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

Erin
9 - Comet

When I first heard about this challenge during this year's Inspire conference, I honestly thought it sounded impossible. Happy to report that I completed the whole challenge without peeking at the posted solutions first! Sorry, a little braggy today. 

 

Spoiler
I decided to go iterative with this and learned about the mod formula:
BronzeFox_0-1629757815986.png
BronzeFox_1-1629757860092.png

 

 

binay2448
11 - Bolide

Find my solution attached...

binay2448
11 - Bolide

Ignore my previous solution find attached updated one.....

MichaelPilotFreight
8 - Asteroid

Check out my solution!

jjrbondoc
8 - Asteroid
Spoiler
jjrbondoc_0-1632418331201.png

 

pdave87
11 - Bolide

Awesome exercise, excited and happy to share my comments as it is finished today. Slightly different approach but totally enjoyed achieving the expected results of app and macro outputs. 

 

These exercises are the corner stone of my foundation in Alteryx. Long hours are worth the effort when there is a learning that involve more conceptual development. This was my first achievement wherein App and macro are paired together to achieve the output. Packaged workflow is attached for reference.

 

Thanks to all the SMEs. Always grateful to be part of this community.

 

Regards,

Pratik

BSilverblatt
8 - Asteroid

Thanks for the challenge! Here is my solution:

LiuZhang
9 - Comet
Spoiler
79 - 1.png79 - 2.png

It works, but not the best interface.

ARussell34
8 - Asteroid

I created an application to check first the number given and then the number immediately before and after the given value. By generating rows I was able to identify all possible values and their divisor per value between 1 and the given value. Basically checking to see all the values between 1 and the given value where they are prime and then used a final formula tool to see which value is the closest prime. I used some final reporting tools to output a small table regarding the given value, if it was prime, and what is the closest prime value if it wasn't the selected value.

Luke_C
17 - Castor
Spoiler
Luke_C_0-1642002075105.pngLuke_C_1-1642002086748.png