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.
SOLVED

Rank by group

ms_315
5 - Atom

Hi everyone,

 

I want to create a rank field which groups based on other fields. However, where the scores the ranks are based on are equal i'd like the ranks to be equal too, and for the next rank to begin at the count of previous ranks +1. Here is some example data, with the final column showing how i'd like my rank field to operate. Each City is ranked based on their score, but the rankings are grouped by year and subject.

 

YearSubjectCityScoreExpected rank
2018AccountingManchester5171
2018AccountingCardiff3222
2018AccountingLondon3222
2018AccountingCambridge404
2018AccountingYork325
2018AccountingBelfast  
2018EnglishChester2021
2018EnglishBrighton2021
2018EnglishYork2021
2018EnglishBelfast114
2019AccountingYork5011
2019AccountingBelfast4002
2019AccountingChester3453
2019AccountingBrighton3453
2019AccountingManchester335
2019AccountingCardiff26

 

I've seen some similar solutions, but none where the rank after the joint rank starts at the count of the previous ranks +1. I hope this makes sense! I'd be really grateful for any solutions to this.

 

Thank you,

Matt

5 REPLIES 5
joshuaburkhow
ACE Emeritus
ACE Emeritus

This is nearly similar to this post from a couple years ago 🙂 Does this solve your issue? 

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Ranking-by-Group-in-Alteryx/m-p/55235#...

 

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
RolandSchubert
16 - Nebula
16 - Nebula

Hi @ms_315 ,

 

the Multi-Row Formula tool is your friend here. I've attached a sample workflow.

 

Best,

 

Roland

DiegoParker
10 - Fireball

Hi @ms_315 ,

 

Find my approach attached:

 

DiegoParker_0-1582824137670.png

 

Be mindful of the grouping in the sort and multi-row formulas.

 

Hope this helps If does, can I ask you to mark it as a solution? this will help other users to find it and will allow us to close the thread. Many thanks!


Best,
Diego

 

ms_315
5 - Atom

Great - thank you for this solution!

Emmanuel_G
13 - Pulsar

One possible solution.

 

Cheers!

Labels