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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Sri_phani
Helper III
Helper III

Ignore RLS and get the rank

Hi, 

I have Employee-wise RLS on the Active agent's table, but I have a separate table called All metrics that has KPIs (1-1 relationship). Now when I applied RLS the ranks show as 1. This is expected behaviour but while finding a workaround, I got to know by removing the relationship between these tables and using the TREATAS function we can get the rank. 

 

I tried many ways but couldn't find a solution. Here is the measure used for finding team-wise rank for selected employees: 

 

Team rank =
VAR table_ =
ADDCOLUMNS(
  FILTER(
    all('All Metrics'[Employee Name],
       'All Metrics'[Supervisor 1 (Team Manager) ]),
           'All Metrics'[Supervisor 1 (Team Manager)] = MAX('All Metrics'[Supervisor 1 (Team Manager) ])
           ),"attain", 
    [Resolve Attainment]
)
Return
Format(rankx(table_,[Resolve Attainment],,desc,Dense), 0)&"/"&COUNTROWS(table_)

 

 
Expected Result is like - 05/10
 
6 REPLIES 6
Sri_phani
Helper III
Helper III

@lbendlin Second table - ALL Metrics table is a disconnected table only on which Rank is created. 

Sri_phani
Helper III
Helper III

@lbendlin I tried using Calculatetable instead of filter, it is giving blanks as well in the result. Sorry, I am finding it hard to understand how can I put a stop to RLS while using Calculatetable function. 

 

Sri_phani_2-1724434340229.png

 

 

There is an alternative - use a shadow table that is disconnected from the data model.

Sri_phani
Helper III
Helper III

@lbendlin How do I incorporate Crossfilters in this measure? 

 

Team rank =
VAR table_ =
ADDCOLUMNS(
  FILTER(
    all('All Metrics'[Employee Name],
       'All Metrics'[Supervisor 1 (Team Manager) ]),
           'All Metrics'[Supervisor 1 (Team Manager)] = MAX('All Metrics'[Supervisor 1 (Team Manager) ])
           ),"attain", 
    [Resolve Attainment]
)
Return
Format(rankx(table_,[Resolve Attainment],,desc,Dense), 0)&"/"&COUNTROWS(table_)

 

use CALCULATETABLE instead of FILTER

lbendlin
Super User
Super User

Read about CROSSFILTER(,,NONE) - that allows you to temporarily break relationships.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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