Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Rank products by sales and then flag the products that contribute to 50% of sales

Usamah22
8 - Asteroid

Hi,

 

i want to rank my products and then identify the ones that contribute to 50% of the total volume so i can make a flag column with "Key Line". the sales would change each month so the products could change. how can i do this? data is like below.

 

productSales
a1
b7
c2
d1
e9
5 REPLIES 5
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Usamah22,

 

You might need to go into a little more detail about the "Key Line" flag. Do you want to flag the product up if its sales made more than 50% of total sales?

 

I've mocked up an example with your data (using the above methodology, with no product selling >= 50% sales all "Key Line Flag" = "No"

Jonathan-Sherman_0-1594048479534.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

 

Usamah22
8 - Asteroid

Sorry i didn't explain clearly. i want to highlight which are the products that really contribute to the total sales figure of 20. you can see below products a and b are the main drivers. i want to be able to highlight such products so we can easily see them.

 

productSales% of TotalKey Line
a840%Key Line
b735%Key Line
c210% 
d15% 
e210% 
Total20100% 
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Usamah22,

 

So what is it that defines a "Key Line"? Is it being in the top 2 percentage contributions or is it any products where contribution is greater than X for example?

 

Regards,

Jonathan

Usamah22
8 - Asteroid

In reality i have to do this for 900+ products so the top 2 wouldn't work. The top n number of products that contribute to 50% of the volume would be key lines. does that make sense?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Usamah22,

 

You could use a running total:

 

Jonathan-Sherman_0-1594051025598.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached an updated workflow for you to download if needed.

 

Regards,

Jonathan

Labels