Excel, COUNTIFS, Wildcards and the Most Popular Trio of Pizza Toppings
Of more than 200 pizza orders and 20 ingredients, which trio of toppings shows up the most?
This was more of a mind exercise because the Excel piece was easier than I thought. One challenge is that we want which 3 show up together the most–even if they are with other items. Example:
3 pizzas:
– Extra cheese, mushrooms, grilled onions
– Ham, extra cheese, black olives, grilled onions, mushrooms
– Mushrooms, pepperoni, grilled onions, extra cheese
These all count toward the trio of: extra cheese, mushrooms, grilled onions. We need Excel to see that.
The first step is to get a list of all the possible combinations of 3 toppings:
Out of 20 items, there are 1140 combinations of 3.
Thanks to the MathiIsFun website, we can get a list of all 1140 combinations.
https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html
Then we need Excel wildcards and COUNTIFS to tally how many times each of the 1140 trios was ordered.
#CombinationsAndPermutationsInExcel
#COUNTIFS
#ExcelWildcards
For an intro to Get & Transform (Power Query) try my Lynda/LinkedIn course:
https://www.linkedin.com/learning/instructors/oz-du-soleil?trk=insiders_28299411_learning
Website: https://ozdusoleil.com
My book: Guerrilla Data Analysis 2nd Edition
http://www.amazon.com/Guerrilla-Analysis-Using-Microsoft-Excel/dp/1615470336
My old blog: http://datascopic.net/blog-2-2