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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors