Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
ID | Code | Sort |
---|---|---|
1 | R | |
1 | V | 1 |
2 | R | |
2 | E1 | 2 |
3 | R | |
3 | E2 | 2 |
3 | V | 1 |
4 | R | |
4 | E2 | 2 |
4 | B | 3 |
Code | Count |
---|---|
V | 2 |
E1 | 1 |
E2 | 1 |
B | 0 |
R | 0 |
Create a calculated dimension
=AGGR(if(Sort = Min(TOTAL <ID>Sort),Code),ID,Code)
then an expression:
count(ID)
B & R won't appear if the related sort values are nulls...
How did you get a count of 1 for code E2, when the sort value is 2 for both rows? I would of thought the count should be 2... I'm confused (doesn't take much)
Because the E2 for ID 3 has a sort value of 2 while V (of ID 3) has a sort value of 1. So only the smallest sort value should be counted.
Create a calculated dimension
=AGGR(if(Sort = Min(TOTAL <ID>Sort),Code),ID,Code)
then an expression:
count(ID)
B & R won't appear if the related sort values are nulls...
That's it!
Thanks a lot for your help
Erik