Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
giorgiokatr
Helper V
Helper V

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)

 

 

1 ACCEPTED SOLUTION

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.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

5 REPLIES 5

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. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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?

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.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

thanks @MattAllington

it is quite difficult to create summary tables as there are many dimensions in my rank report (time,hierarchy, many ranking kpis)

I was trying to find a way to bypass rls for calculating rank

RLS is designed to prevent the data being available to those that should not see it. No you can’t get around this.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors