Alteryx Design Pattern: Keeping Sort Order After a Summarize, Unique or Other Tools
You have data that you want to summarize or get rid of duplicates and in developing a workflow realize that the data gets automatically sorted on the output, but you would like to keep the order that the data is in or some order other than what is given, even with aggregation!
You can simply do this by adding a Record ID tool, and in the case of a Summarize tool, just use the Sort Order column as a ‘First’ or in the case of using the Unique tool just sort on that column after the Unique tool. Now you are not at the mercy of the sort given to you.
- Input Data
- Add Record ID (I name mine “Sort Order”)
- Add Summarize, Unique or any other tool (that has the sorting embedded)
- For Summarize – use the “Sort Order” column with ‘Action’ dropdown set to ‘First’
- For Unique – Add a sort after the Unique tool