Hi there,
I am trying to figure out how to assign quartiles based on different key metrics and including criteria. In the example below, I want to be able to assign quartiles for the different products but only include products in that same department in the calculation. For example, what quartile do Apples fall into within produce for sales and then for profit. Output would be three new columns that list each product's quartile (1, 2, 3, or 4) for each metric, as shown in the blank columns. Can anyone please assist?
Department | Product | Sales | Profit | Marketing Cost | Sales Quartile | Profit Quartile | Marketing Cost Quartile |
Produce | Apple | 10 | 5 | 2 | |||
Produce | Pear | 14 | 7 | 2.8 | |||
Produce | Peach | 10 | 5 | 2 | |||
Produce | Banana | 13 | 6.5 | 2.6 | |||
Dairy | Milk | 10 | 5 | 2 | |||
Dairy | Yogurt | 9 | 4.5 | 1.8 | |||
Dairy | Ice Cream | 7 | 3.5 | 1.4 | |||
Dairy | Cheese | 7 | 3.5 | 1.4 | |||
Dairy | Cream | 6 | 3 | 1.2 |
Hi @ksmith4567 - Here is a link to a few more ideas: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Calculating-Quartiles/td-p/28479