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 #488: Shuffle Royale

AYXAcademy
Alteryx
Alteryx

Full Width - WC banner.svgHi Community members,

 

A solution to last week’s challenge can be found here.

 

This challenge was submitted by Guilherme Dias, @Bennu . Thank you, Guilherme, for your submission!

 

This challenge is designed to test your advanced Alteryx Designer skills, particularly in app development, data manipulation, and logic handling.

 

You've just landed a high-profile client who operates a casino, and they’re curious to see how Alteryx stacks up against a human dealer. Your task is to build an Alteryx Analytic App that simulates card dealing in a casino setting.

 

You’ll be provided with two datasets:

  • One containing suit symbols and names
  • One containing card values (2–10, J, Q, K, A)

 

You recently got a new high-profile client who runs a casino. They want to run some simulations to see how Alteryx would compare against a human dealer. This is a APP-based challenge where you can test your more advanced skills in Alteryx Designer.

 

Your first dataset contains the suit and suite names, and you second dataset contain the card values (2-10, J, Q, K, A).

 

Task 1: Build the Full Deck

Using the two datasets, generate a complete standard deck of 52 playing cards by combining all card values with each of the four suits.

 

Task 2: Develop an Alteryx App that:

  • Randomly shuffles the deck.
  • Prompts the user to input:
    • The number of players (between 2 and 10)
    • The number of cards to deal to each player (between 1 and 13)
  • Distributes cards accordingly:
    • Each player receives the specified number of cards
    • The remaining cards are placed in a separate draw pile (output dataset)

Notes:

  • You may assume that users will enter only valid combinations (i.e., the total number of cards dealt will not exceed 52).
  • A macro is available to shuffle the cards, if needed.

 

Task 3: Sort Each Player’s Hand by Custom Rules

Implement custom sorting logic for each player's hand based on the following criteria:

  1. Suit Frequency: Suits with fewer cards in hand appear first.
  2. Lowest Card Tiebreaker: If two or more suits have the same number of cards, the suit with the lowest-ranking card comes first.
    • For example, a hand with 6♣-A♣ comes before Q♠-K♠ because 6 < Q.
  3. Suit Priority: If the lowest cards are the same, use this suit priority as a final tiebreaker:
    • Spades (♠), Hearts (♥), Diamonds (♦), Clubs (♣)

 

Example:

For the hand K♦, 2♠, 6♠, 2♣, K♣:

  • Suits with 2 cards: Spades and Clubs
  • Both have a lowest card of 2
  • Suit priority applies: Spades come before Clubs

 

Final order: 2♠, 6♠, 2♣, K♣, K♦

 

Once you have completed your challenge, include your solution file and a screenshot of your workflow as attachments to your comment.

Good Luck!

 

The Academy Team

 

Download Start File

Download Solution File

rmassambane
11 - Bolide

488

Hub119
11 - Bolide
11 - Bolide

This was a fun one... a great break from Advent of Code problems before I finish off the final 8 stars of all 10 years (500 stars here we come). Meanwhile, the timing for this challenge is perfect as I am heading to Vegas on Friday... maybe I should build in some win probability calculations too while I'm at it...

Spoiler
WorkflowWorkflow
Spoiler
Outer Shuffle and Deal MacroOuter Shuffle and Deal Macro
Spoiler
Shuffle MacroShuffle Macro

 

alineruizcampos
8 - Asteroid
Spoiler
Screenshot 2025-08-28 221443.pngScreenshot 2025-08-28 221450.png
balajilolla3
6 - Meteoroid
Spoiler
Solution Attached

Challenge 488 Solution Screenshot.png

 


RolandSchubert
16 - Nebula
16 - Nebula
Spoiler
488.jpg
Kenda
16 - Nebula
16 - Nebula
Spoiler
image.png
lwolfie
11 - Bolide

Fun Challenge

Spoiler
Screenshot 2025-08-28 113108.png

olga_strubbe
11 - Bolide

This was a jaw breaker, I did enjoy it quite a lot. Thank you, @Benny 

I incorporated solution 2 & 3 together for the dealt hand that is dynamically sorted for the players.  I also used the macro provided to shuffle the cards. 

Here is my app screenshot + attachment. 

Spoiler
2025-08-28_12-35-12.png
Pilsner
13 - Pulsar

I love a game of cards, great challenge. Here's my solution:

Spoiler
488.png