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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sagejah9
Helper III
Helper III

Show all data on table if user name not in the table

Hi , I am trying to use dax logic to create the rls to filter a particular table. First I'm checking the username based on their access. I would like to filter the table to only the person if they are in the table otherwise the person gets to see all data in table. 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Sagejah9 ,

 

Based on your description, I think you can configure dynamic rls by using the userprincipalname() function. Determine if the current user is in the table, and if present, allow access to the content. I did the test with the following reference.

vhenrykmstf_0-1646988334135.png

vhenrykmstf_1-1646988374638.png

if user not in table:

vhenrykmstf_2-1646988448031.png

 

For more details, you can read related blog as below:

USERNAME() v/s USERPRINCIPALNAME() in RLS for Pow... - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @Sagejah9 ,

 

Based on your description, I think you can configure dynamic rls by using the userprincipalname() function. Determine if the current user is in the table, and if present, allow access to the content. I did the test with the following reference.

vhenrykmstf_0-1646988334135.png

vhenrykmstf_1-1646988374638.png

if user not in table:

vhenrykmstf_2-1646988448031.png

 

For more details, you can read related blog as below:

USERNAME() v/s USERPRINCIPALNAME() in RLS for Pow... - Microsoft Power BI Community


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors