MIP Logo

Alteryx – Ranking a List by Group

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

          Ranking is used to display data in a ranked order. We can rank a list by group using the Multi-Row Formula in Alteryx. I am excited to show how easily this can be done. In this blog, I am using a list of daily sales, accounts and category, and I would rank sales from highest to lowest for daily sales.

2.          The steps in Alteryx are as follows:
a. Ensure that the data is sorted by date. Also the sales are sorted from highest to lowest for the daily sales.
b. Add in the Multi-Row formula too.

3.           Select the field Dates as we want them to be grouped (see selection).

4.          To rank the sales, write the expression:
if [Sale] != [Row-1:Sale]
then [Row-1:Rank]+1
else [Row-1:Rank]
endif
5.           A new column called “Rank” is created.

There you have it folks. It is easy to see how ranking can be done on Alteryx. Thanks for reading my blog. Do look forward to more blogs on Alteryx functions in the coming weeks.

Share this post