Reputation: 304
I have a table with three columns Id
, A
and B
. Id
is unique, but I want to identify and rank duplicates across Columns A
and B
.
So for the following data
Id | A | B
----|---|---
1 | a | b
2 | a | c
3 | a | b
4 | c | b
5 | a | c
I want to get the following 'ranks' for each Id
Id | Rank
----|------
1 | 1
2 | 1
3 | 2
4 | 1
5 | 2
I though I could achieve this using an LOD but trying this doesn't work. Any ideas on how to achieve this?
I basically want the row with the lowest Id for a fixed A
and B
to have a rank of 1; the next lowest Id for the same fixed A
and B
to have a rank of 2 etc.
The following was what I attempted but it's not working - I need to run an aggregate on Id
for the RANK
function to work but I can't think which to use.
{
FIXED [A], [B] :
RANK([Id])
}
Upvotes: 0
Views: 1346
Reputation: 7737
There are two issues with your calculation.
This kind of scenarios can be easily handled with Table calculations RANK or INDEX. For example, create a calculated field INDEX with formula INDEX()
and build the view as below.(Please note that INDEX is calculated using 'Pane Down')
Upvotes: 1