Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a table that has ITEMS and CHECK NUMBERS. For each check number, there could be any number of items. I would like to know for each ITEM that I have, which other items show up most often on the same CHECK NUMBER.
The table below shows a few different checks. Calvin Creamidge is on two different checks, so this formula should help me see that for each check number that Calvin Creamidge was ordered, it was paired with an Oatbama *NITRO* most often, and everything else second most often.
For Oatbama *NITRO*, the formula should help me see that it is paired on a check number with a STICKER most often, tied with Calvin Creamidge, then everything else second most often. I would like the formula to ignore the times OATBAMA shows up on the same check number (I don't need to know if ordering this beer once makes them order it again).
Thank you in advance for the help!
ITEM | CHECK NUMBER |
Calvin Creamidge | 080996 |
Shandrew Jackson Raspberry | 080996 |
POTUS Burger | 080996 |
Fried Pickles | 080996 |
OG Burger | 080996 |
Oatbama *NITRO* | 080996 |
Oatbama *NITRO* | 080996 |
Sticker | 080996 |
Sticker | 080996 |
Oatbama *NITRO* | 081000 |
Calvin Creamidge | 081000 |
Boneless Wings | 081024 |
Dill Clinton | 081024 |
Rutherford Double D Haze | 081024 |
Oatbama *NITRO* | 081024 |
Fried Cheese Curds | 081024 |
Dill Clinton | 081024 |
Rutherford B. Haze | 081024 |
Ryesenhower | 081024 |
Dill Clinton | 081024 |
Oatbama *NITRO* | 081024 |
Ryesenhower | 081024 |
Nachos | 081024 |
@VahidDM The output should look at each item in the table, and rank the items that show up on the same ticket number by frequency. I really only need it to rank the top 3 items. We do not need to know the quantity of items that shows up on one ticket. I am most interested in knowing which things get ordered together the most.
Item | Found on Same Check | Rank | Count of appearances on same check |
Boneless Wings | Dill Clinton | 1 | 1 |
Fried Cheese Curds | 1 | 1 | |
Nachos | 1 | 1 | |
Calvin Creamidge | Oatbama *NITRO* | 1 | 2 |
Fried Pickles | 2 | 1 | |
OG Burger | 2 | 1 | |
Dill Clinton | Boneless Wings | 1 | 1 |
Fried Cheese Curds | 1 | 1 | |
Nachos | 1 | 1 | |
Fried Cheese Curds | Boneless Wings | 1 | 1 |
Dill Clinton | 1 | 1 | |
Nachos | 1 | 1 | |
Fried Pickles | Calvin Creamidge | 1 | 1 |
Oatbama *NITRO* | 1 | 1 | |
OG Burger | 1 | 1 | |
Nachos | Boneless Wings | 1 | 1 |
Dill Clinton | 1 | 1 | |
Fried Cheese Curds | 1 | 1 | |
Oatbama *NITRO* | Calvin Creamidge | 1 | 2 |
Boneless Wings | 2 | 1 | |
Calvin Creamidge | 2 | 1 | |
OG Burger | Calvin Creamidge | 1 | 1 |
Fried Pickles | 1 | 1 | |
Oatbama *NITRO* | 1 | 1 | |
POTUS Burger | Calvin Creamidge | 1 | 1 |
Fried Pickles | 1 | 1 | |
Oatbama *NITRO* | 1 | 1 | |
Rutherford B. Haze | Boneless Wings | 1 | 1 |
Dill Clinton | 1 | 1 | |
Fried Cheese Curds | 1 | 1 | |
Rutherford Double D Haze | Boneless Wings | 1 | 1 |
Dill Clinton | 1 | 1 | |
Fried Cheese Curds | 1 | 1 | |
Ryesenhower | Boneless Wings | 1 | 1 |
Dill Clinton | 1 | 1 | |
Fried Cheese Curds | 1 | 1 | |
Shandrew Jackson Raspberry | Calvin Creamidge | 1 | 1 |
Fried Pickles | 1 | 1 | |
OG Burger | 1 | 1 | |
Sticker | Calvin Creamidge | 1 | 1 |
Fried Pickles | 1 | 1 | |
OG Burger | 1 | 1 |
Hi @jocko327
Can you post a sample of the expected output?
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/