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 #93: Pumpkin Production

jarjarbingie
8 - Asteroid
Spoiler
clipboard_image_0.png
Bluemoon
8 - Asteroid

Overly complicated my solution, might try and get it down to fewer tools...

Spoiler
clipboard_image_0.png
erick_irigoyen
Alteryx Alumni (Retired)

Solution attached

jbrowne02
6 - Meteoroid

A lot of joins. Maybe there's a better way?

Ellie_P
8 - Asteroid
 
jlangl11
7 - Meteor
Spoiler
Workflow Picture.PNG

Decided to do it two different ways. One with the sorting attempt used by Patrick and then the way using summarize which was more natural to me.

SueDonim
8 - Asteroid

Fun exercise - I'm happy with my solution this time (at least I am before looking at the others)

 

 

Spoiler
What I learned:
- ReplaceChar function (for getting rid of pesky commas)
- Dynamic Rename (had used once, but forgot it)
- At least a couple of uses of Sample tool
- Careful design can simplify process (duh!)

Process:
- Remove commas from data
- Padleft State ANSI code
- Convert string to number
- Separate piped data into columns
- Change first record to field names with Dynamic Renaming tool
- Joined data on State ANSI code
- Summary tool to calculate average production by state (Group by State, then calculate average) - really only needed one of these tools rather than two
- Join data together with data in an upper stream and a lower stream
- Sort data by year and by production (descending)
- Sample Top 1 from upper stream (for Max)
- Sample Bottom 1 from lower stream (from Min)
- Cleanup fields
- Calculate difference from average for each stream
- Join data into single table

MySolution.PNG

 

 

MartinLuus
7 - Meteor
 
Jean-Balteryx
16 - Nebula
16 - Nebula

Here is my solution !

blundebjerg
8 - Asteroid

Here is my long-winded but complete solution!