Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to rank based on multiple row criteria

Pran19G
5 - Atom

Hey Alteryx community!

 

Got what should be a fairly straightforward query but it's causing me difficulty.

 

I am looking to rank my data based on multiple criteria, and have already sorted the data to start.

Looking to pull back the top 3 rows, per product on each day. Please see the example below:

 

No, DateValueGroupDesired Ranking
110/10/201000A1
210/10/20 100A2
310/10/20 10A3
410/10/20 1C1
512/10/20 1000B1
612/10/20 100B2
712/10/20 10C1
812/10/20 5A1
912/10/201A2

 

 

Hope this makes sense and hope someone can help me out too! 

 

Thanks!

2 REPLIES 2
ChrisTX
15 - Aurora

Try the Sample tool.

 

Group by product and day, First N rows, N = 3

 

Then the Tile tool can create the field for Ranking

 

Chris

gsantos
7 - Meteor

Hello there, @Pran19G 

 

I attached a workflow with my approach to this scenario.

 

From here, just take the sample based on rank per group - day, or simply use a sample tool grouping by these fields.

 

The Record Id tool and thus the Join Tool are not quite necessary but I just wanted to show you different ways of achieving your goals by exploring multiple tools.

 

Hope it helps.

 

Feel free to reach if you need further assistance.

Labels