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

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

Reply
Huguo90
Helper I
Helper I

Problem with RLS on Power desktop and Power BI Service

I created a two roles on Power BI Desktop they work, when I test them on Power BI service it doesn't work, here are the codes. Can someone help me understand what happened please?

 

ROLE 1

IF(
MAXX(
FILTER('DISTRIBUTOR_USERS','DISTRIBUTOR_USERS'[Email]=USERPRINCIPALNAME()),
'DISTRIBUTOR_USERS'[DISTRIBUTOR_USERS])=1,
'DISTRIBUTOR_USERS'[Email]=USERPRINCIPALNAME(),
1=0)

 

ROLE 2

[AccountId] = LOOKUPVALUE('HR_USERS'[AccountId],
'HR_USERS'[Email],USERPRINCIPALNAME(),'HR_USERS'[AccountId],'Contact'[AccountId],'Contact'[HR_USERS]=0
)
&& 'Contact'[HR_USERS]=0

 

Thanks you.

 

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Huguo90 


Could I ask how you are testing the roles?

 

If you are testing with your own account, that will not work because you uploaded the PBIX you are an Admin and will always see everything.

 

You will need to log in as one of those other users to test.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hello @GilbertQ , 

 

I go to security as on dataset, I put the email adress on the role and after that I click on tested as role. But It's don't work. The distributor_user works but not the RH USER: 


Huguo90_0-1668506695262.png

 

 

 

Huguo90_2-1668508137762.jpegHuguo90_3-1668508154287.png

 

 

Normaly, I do the to good step.

Hi @Huguo90 


Can that user also have read permissions to the underlying dataset?

 

Creating “Read” permissions on reports & datasets (Allowing to view datasets from remote apps) - Fou...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.

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.

Top Solution Authors