Forum Discussion
Anonymous
7 years agoNot applicable
Ranking
Hi,
My data has multiple rows with similar values (See Source number). I need to rank source number to be able to carry out further analysis. After applying RANKX function, i get rank in the following manner. It skips numbers in between, due to multiple rows.
| Source Number | Reason | Rank |
| 24563 | Null | 1 |
| 24563 | Null | 1 |
| 24563 | Invalid | 1 |
| 24563 | Invalid | 1 |
| 24563 | Invalid | 1 |
| 23456 | Null | 11 |
| 23456 | Invalid | 11 |
| 23456 | Invalid | 11 |
| 23456 | Null | 11 |
| 24534 | null | 6 |
| 24534 | null | 6 |
| 24534 | Invalid | 6 |
| 24534 | null | 6 |
I need my data to look like this:
| Source Number | Reason | Rank |
| 24563 | Null | 1 |
| 24563 | Null | 1 |
| 24563 | Invalid | 1 |
| 24563 | Invalid | 1 |
| 24563 | Invalid | 1 |
| 23456 | Null | 3 |
| 23456 | Invalid | 3 |
| 23456 | Invalid | 3 |
| 23456 | Null | 3 |
| 24534 | null | 2 |
| 24534 | null | 2 |
| 24534 | Invalid | 2 |
| 24534 | null | 2 |
Can you please help with the right logic
Thanks in Advance.
Anonymous change the last argument of RANKX from Skip to Dense
1 Reply
- LivioLanzoSolution Sage
Anonymous change the last argument of RANKX from Skip to Dense