Forum Discussion
making rank work after applying rls security
my rank works great but if i use rls tofilter a branch for example make a role to use only branch 2
rank does not work
is there any workaround to make this work?
RankBranchall = RANKX(ALL(Branches);[% Diff.];;ASC;Dense)
Rank works across visible data.
So if there is the following
A 10
B 30
C 5
D 40
Rank will be
D
B
A
C
If someone can only see A and B, rank will be
B
A
If you want to see the original rank you need to evaluate the ranks and store them in your data model so everyone can see them. You can do this probably best in a summary table.
5 Replies
- MattAllington
Community Champion
What do you mean “it does not work?” Do you mean it only works over the sub set of the data visible to the RLS? If so, I suggest you will need to write the data to a calc column or summary table.
- giorgiokatr
Helper V
thanks MattAllington
there are 400 branches so without rls rank goes from 1 to 400 (based for example in sales of each branch)
when i use rls branch 2 has only rank 1 beacause it is filtered
is it possible to only be able to see branch 2 (rls ) but calculate the right rank?
- MattAllington
Community Champion
Rank works across visible data.
So if there is the following
A 10
B 30
C 5
D 40
Rank will be
D
B
A
C
If someone can only see A and B, rank will be
B
A
If you want to see the original rank you need to evaluate the ranks and store them in your data model so everyone can see them. You can do this probably best in a summary table.