This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email email@example.com for assistance.
Here is the new weekly challenge. The link to the solution for last challenge is HERE. For this challenge let’s look at ranking records when multiple records can have the same rank.
The objective is to determine the top 5 ranking based on the count, however since there are multiple rows with same count (similar to a round of golf) multiple people can be in the same place (Rank) if they have the same score.
We have listed this as a beginner challenge and I expect it will go very quickly for many of you. Let us know what you think, we are looking forward to hearing your feedback.
I was able to get to the solution using only these three tools! I was a little surprised this worked since I did not specifically tell Alteryx to put a 1 in row one of the Rank column. It must have assumed that if row: -1 is the header, it would assign row 1 a value of 0? Maybe oversimplifying this but it is pretty cool to see all the different ways alteryx can handle this task!
I first sorted the data by count in descending order. I then used the "Tile" tool to assign a new number for every unique value, with "Count" selected (ensure "Leave Unsorted" is checked). I then simply applied a filter to the "Tile_Num" field to show top 5, then renamed the field. Simple.
Solution! I tried to think outside the box on this one, there are certainly several simpler solutions already posted. But why keep things simple when you can overcomplicate things with a transpose and a cross-tab? 🙂
Note: I really really really wish there was a "Max/Min" tool. (Yes, I will be suggesting this.) Seems like more than a few of us are regularly accomplishing this by using 2-3 tools - Sort + Sample, or Sort + Select Record, or finding the max of a field using Summarize + Join back all the other fields you need + Filter to weed out the non-matches... It seems like there should be a tool that lets you pick the max or min of something based on a certain field without having to use 2-3 tools to get there. Even better if there was one that let you pick the Top N or the Bottom N (which Sample does), but WITHOUT having to sort/etc. first. If i am completely missing out on a single tool that already does this, please oh please do share! I feel like I'm going crazy with these 2-3 tool "find the max" workflows! 🙂
Solution: Transpose (Group by Count, Columns = First, Values = Count), Sort by descending Count, Select first 5, Add Ranking via RecordID, Cross-Tab to re-orient the results, Filter out NULL values, rename/reorder columns.