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.

rank based on the amount

Sshasnk
8 - Asteroid

So I have a dataset for each account and I have to rank them based on the amount

 

Input:

 

accountamount
123412
123415
123445
123465
1212
1245
124

 

Rules:

 

1. Highest amount will get ranked as 1 for that account

2. Second highest will get ranked as 2 for that account

3. Everting after the second highest should get ranked as 3

4. Please, remember for rank 3 we don't know how many rows will come

 

Output:

 

accountamountRank
1234123
1234153
1234452
1234651
12122
12451
1243

 

4 REPLIES 4
ShankerV
17 - Castor

Hi @Sshasnk 

 

This can be achieved with the help of Tile tool and Multi row formula tool.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Sshasnk 

 

Please find the sample use case for your scenario.

 

ShankerV_0-1677651035050.png

Ran with multiple scenarios:

ShankerV_0-1677651212127.png

 

Many thanks

Shanker V

Raj
16 - Nebula

one way of solving this

niteshsharma677
7 - Meteor

Hi Sshasnk,

 

PFA the Alteryx Solution for your query.

niteshsharma677_0-1677656791751.png

 

 

Thanks

Labels
Top Solution Authors