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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
avulasandeep
Helper III
Helper III

RLS for Multiple Tables

Hi All,

Need Help regarding RLS for MUltiple Tables .

Here is  the question Mentioned in the Link .
IF you click on the link you can find the screenshot and Excel what i am asking  for ..
RLS for Multiple Tables 
Click Here for RLS FIles 

I have 4 Tables in that i have Table1, Region , District  and Dealer Tables . Here i have Mentioned  RLS for the all the Tables in the screenshot . PLease open the link and You can see what exactly i am asking for . I Need RLS for Multiple Tables USers / mail id.

Thanks in Advance 
Sandeep


1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @avulasandeep 

According to your description, I can roughly understand your requirement, I think you can try my steps:

  1. Go to the “Manage Roles” to create a new role and enter the DAX formual like this:

vrobertqmsft_0-1625045862548.png

 

[Dealer ID] in
SELECTCOLUMNS(
FILTER(
'Dealer',
[Email] = UserPrincipalName()),
"Dealer ID",[Dealer ID])
||
[District] in
SELECTCOLUMNS(
FILTER(
'District',
[Email] = UserPrincipalName()),
"District",[District])
||
[Region] in
SELECTCOLUMNS(
FILTER(
'Region',
[Email] = UserPrincipalName()),
"Region",[Region])
  1. Then you can create a measure to display your currecnt userprincal name in the power Bi desktop:
USERPRINCIPALNAME = USERPRINCIPALNAME()
  1. You can go the the “View as” to test the RLS using the “New role”:

vrobertqmsft_1-1625045862551.png

vrobertqmsft_2-1625045862554.png

 

  1. Test successful, then you can publish this report to the Power Bi service to add users to the new role to make the RLS work:

vrobertqmsft_3-1625045862555.png

 

And you can get what you want.

You can download my test pbix file below

 

The document link I followed:

https://radacad.com/dynamic-row-level-security-in-power-bi-with-exclude-and-include-rules 

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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-robertq-msft
Community Support
Community Support

Hi, @avulasandeep 

According to your description, I can roughly understand your requirement, I think you can try my steps:

  1. Go to the “Manage Roles” to create a new role and enter the DAX formual like this:

vrobertqmsft_0-1625045862548.png

 

[Dealer ID] in
SELECTCOLUMNS(
FILTER(
'Dealer',
[Email] = UserPrincipalName()),
"Dealer ID",[Dealer ID])
||
[District] in
SELECTCOLUMNS(
FILTER(
'District',
[Email] = UserPrincipalName()),
"District",[District])
||
[Region] in
SELECTCOLUMNS(
FILTER(
'Region',
[Email] = UserPrincipalName()),
"Region",[Region])
  1. Then you can create a measure to display your currecnt userprincal name in the power Bi desktop:
USERPRINCIPALNAME = USERPRINCIPALNAME()
  1. You can go the the “View as” to test the RLS using the “New role”:

vrobertqmsft_1-1625045862551.png

vrobertqmsft_2-1625045862554.png

 

  1. Test successful, then you can publish this report to the Power Bi service to add users to the new role to make the RLS work:

vrobertqmsft_3-1625045862555.png

 

And you can get what you want.

You can download my test pbix file below

 

The document link I followed:

https://radacad.com/dynamic-row-level-security-in-power-bi-with-exclude-and-include-rules 

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors