Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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_)
@lbendlin Second table - ALL Metrics table is a disconnected table only on which Rank is created.
@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.
There is an alternative - use a shadow table that is disconnected from the data model.
@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
Read about CROSSFILTER(,,NONE) - that allows you to temporarily break relationships.