Experts
While apply ranking on a table and apply filter to show top 5 then it works fine however when there's a duplicate rank value ( more than 2 or 3 ) how can we limit to show top 5 rows only ?
I've tried with few variations but unable to solve it -
i.e., for the following table 01 - I have type as dimension and value as measure , created a variable to calculate the rank then applied filter on the variable to show top 5 ( less than or equal)- works fine.
however, if I have the rank value 1,2,3,3,3,4 how can i show the top 5 rows ? or if i have rank values as 1,2,3,4,5,5 - again how to achieve to show top 5 rows only?
These are the ways I have tried -
> Runningcount(type) (output - 1 or 1 ) to count the number of rows then apply filter on to show when value is 1 but as I have already a rank filter hence this additional filter doesn't work.
> another way i have tried - added another column to see if the previous rank is same as the current rank .. if yes then ++1 for the new rank ..then applied filter again on the table but doesn't work.
Table - 01
Type | value | var_rank_value = rank(value;[type])
--- ----- ----------------------
Green 12 1
Blue 11 2
Brown 10 3
Black 9 4
Orange 5 5
Yellow 2 6