Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Sort Numbers Largest to Smallest and Smallest to Largest


I am new to Alteryx and I don't understand how to sort numbers by Largest to Smallest within a column.  I need 2 fields sorted Largest to Smallest, then after that, I need another column sorted Smallest to Largest to calculate a Multi-Row formula correctly.

Please note that there can be duplication's of all the numbers.


Local Member Firm Fees = Largest to Smallest

Other Member Firm Fees = Largest to Smallest

Opp ID = Smallest to Largest


See what the final example should look like attached: 


First, I'd make sure your field types are all number format, so use a Select tool to check field types... then use the Sort Tool and start with the first column you want sorted (Opportunity ID) and sort Ascending... then the next line will be Local Member Firm Fees sorted Descending, and Other Member Firm Fees sorted Descending.






Alteryx Certified Partner

You will want to use the Sort tool for this.  You are able to set multiple fields to sort on and choose whether they should be sorted in ascending or descending order.


Thank you Nicole & Nick.


Hi Nick, 


I have the same issue and using Sort tool. 


but after 1 the next row shows is 10, 11, 12 .... 19 and then 2.


Can you please suggest if there is a way to deal with this. 



Ahsan Khalid

Alteryx Certified Partner
Alteryx Certified Partner
When sorting strings with numbers, the way to get the numbers in order is to use the dictionary sort option (check box) in the sort configuration.


Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.