We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Sorting on Multiple Factors and Within Groups

shelbybradley
7 - Meteor

I am having trouble sorting values based on multiple factors of priority, and then sorting within groups.

 

Context: 

- I want to set an overall rank of priority on a product-customer level based on a set of prioritizations. Ultimately, I want to calculate how much revenue I can satisfy given my supply constraints in this scenario.

 

My order of sorting priority is: 

1. Product is demanded by Amazon (Yes or No)

2. Products with the highest overall $ Demand (among all customers), descending order

3. Customers the the highest $ demand, within each product group, descending order. 

 

My questions are: 

1. How do I sort on multiple factors sequentially so that they all remain intact?

2. How can I sort values with a particular group ( addressing the third prioritization factor ) so that I can order customer demand within each product? - again, without disturbing the first two sort factors

 

I have attached an example data set that shows product, customer, and demand.

 

THANKS

 

 

5 REPLIES 5
amruthas2
8 - Asteroid

Hi @shelbybradley 

 

You will have to create a column using formula function for Amazon yes or no flag, rest everything with Sorting works with Sort function, 3rd sort criteria doesnt impact much as the number is already sorted at 2nd point, else you can move the order, but sort function works in sequntial order  

amruthas2_0-1645329558195.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @shelbybradley 

 

You would need to handle 1st, 2nd as one and 3rd criteria separately. Handling it together might not give you the desired output.

 

1. Product is demanded by Amazon (Yes or No)

2. Products with the highest overall $ Demand (among all customers), descending order

 

As you can see below after above 2 sorts Product shirt is spread out since there is a higher sort there is no way to bring shirt together.

atcodedog05_0-1645345700444.png

 

3. Customers the highest $ demand, within each product group, descending order. Here first 2 are broken.

atcodedog05_1-1645345804247.png

 

If you have a specific idea of output in mind share with us we can try to achieve it.

 

Hope this helps : )

shelbybradley
7 - Meteor

@atcodedog05 

 

Thanks for your response...

 

I think your output is close (the products are all grouped together, and customer demand by product is ordered within each product group. However, I think the ideal output would be if the Products were ordered Shirts, Computer, Hat, etc... since for shirts...

 

1. Amazon is one of their in demand customers

2. Shirts has the greatest overall revenue potential (all customers added up)

3. With the customer order you have for shirt products (Google, Exxon, Amazon, Facebook)

 

atcodedog05
22 - Nova
22 - Nova

Hi @shelbybradley 

 

Please find the attached workflow.

 

atcodedog05_0-1645383909825.png

 

Hope this helps : )

 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @shelbybradley 

Cheers and have a nice day!

Labels
Top Solution Authors