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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Daniel29195
Super User
Super User

RLS not working

Hello,
im testing the dynamic RLS, 
i have the following table. 

Daniel29195_0-1685306218921.png


RLS formula 1 ; 

VAR _key =
CALCULATEtable(
values('Table'[empid]),

'Table'[adress] = username())


RETURN
PATHCONTAINS('Table'[emppath], _key )

 

testing RLS on test1 :  test1 , should see all other users. ( the above code doesnt worrk)

Daniel29195_2-1685306287283.png

Daniel29195_3-1685306333917.png




 

RLS formula 2 : 
VAR _key =
CALCULATEtable(
values('Table'[empid]),
filter(
'Table',
'Table'[adress] = username())
)

RETURN
PATHCONTAINS('Table'[emppath], _key )

 

with this code, 
the RLS works. 

Daniel29195_4-1685306415996.png

 

so im confused about why the first code didnt work .

 

 

any help explaining the reason why the first code didnt work correctly, but the second did would be appreciated,

 

 

 



1 REPLY 1
Mahesh0016
Super User
Super User

 

@Daniel29195 

Go to manage role 
select table column 
for E.g [Adress] = USERNAME() click OK.
Than
Go to View As 

Check 

Mahesh0016_1-1685361753491.png

Mahesh0016_2-1685361781554.png

 


@Daniel29195 I hope this helps you!THANK YOU!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.