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
Anonymous
Not applicable

Row level security multiple group memberships

Hi,

 

I am using RLS to filter what a logged in person can see but i am really struggling with the scenario where a person should be able to see more than one groups data. So far i am using this funcion which works fine when only one group is assigned to a user:

[Group] = (LOOKUPVALUE([Group],[User],USERPRINCIPALNAME()))

 

However, in the scenario below, when B is logged in B will only be able to see the data for group 1 as  the lookup function returns a single value. 

 

NameGroup
A1
B1
B2
C2

 

What to do? 

 

Best Regards

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

Hi @Anonymous ,

Please try the formula as below and check if it can work well...

[Group]
    IN CALCULATETABLE (
        VALUES ( 'Table'[Group] ),
        FILTER ( 'Table', 'Table'[Email] = USERPRINCIPALNAME () )
    )

If the above one can't help you get the expected result, could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please try the formula as below and check if it can work well...

[Group]
    IN CALCULATETABLE (
        VALUES ( 'Table'[Group] ),
        FILTER ( 'Table', 'Table'[Email] = USERPRINCIPALNAME () )
    )

If the above one can't help you get the expected result, could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , the name should be joined with table having email (If bi-directional join, check security filter too)

 

Name - Email

 

Then create role

 

email = principalname()

 

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

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