Hello,
I have a table that looks something like this:
| | a | b | c |
1 | 4283 | 49 | 295 |
| 2 | 3390 | 506 | 432 |
| 3 | 712 | 246 | 825 |
| 4 | 175 | 49 | 100 |
| 5 | 7 | 0 | 393 |
In the end, I'm looking to rank values in each field to produce the following output:
| | a | b | c | a_rank | b_rank | c_rank |
1 | 4283 | 49 | 295 | 1 | 3 | 4 |
| 2 | 3390 | 506 | 432 | 2 | 1 | 2 |
| 3 | 712 | 246 | 825 | 3 | 2 | 1 |
| 4 | 175 | 49 | 100 | 4 | 3 | 5 |
| 5 | 7 | 0 | 393 | 5 | 4 | 3 |
A couple notes:
The values in one field are ranked independently of values in other fields
Please notice how the ranking applies to duplicate values (49 in column b)
I understand how this approach (http://downloads.alteryx.com/Alteryx/Help/Common_Tasks/RankField.htm) could work if I were only ranking a single field but as you can see above, that's not the case. Ranking multiple fields individually is what I'm struggling with. I could do it iteratively (e.g. sorting and ranking each field individually) but hoping someone can recommend a more efficient approach. Any assistance is greatly appreciated?
Thanks,
Dave