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

Dynamic Row level security help

HI,

 

I have data like below for orders table and roles table.
Roles table:

johnbasha33_0-1603267751070.png

Orders table.

johnbasha33_1-1603267800986.png

Now Orders tables has 3 countries, US, UK, canada and Roles table has which country data accessed by which user.

 

Now based on user login to the report Orders table data has to be filtered with RLS.

 

How to do that?

 

As of now i dont have any relationship between these 2 tables.

 

Kindly help
@needhelp   @Pragati11 @MFelix @amitchandak   @GilbertQ @lbendlin @Greg_Deckler 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

I suggest you unpivot you role table and filter it to yes :

Capture5.PNG

 

And create  a relationship between your order table and role table by  Attribute column and Country column. Then follow the steps in https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple to create dynamic rls.

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
Pragati11
Super User
Super User

Hi @Anonymous ,

 

You can refer following articles on how to approach Row-level security in Power BI:

https://radacad.com/what-do-you-need-to-implement-dynamic-row-level-security-in-power-bi

https://www.sqlshack.com/introduction-to-row-level-security-in-power-bi/

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11 Hi Pragati provided links will not help to my situation.

 

Here i would like filter dataset based on login user in Dynamic way with RLS.

Hi @Anonymous ,

 

I suggest you unpivot you role table and filter it to yes :

Capture5.PNG

 

And create  a relationship between your order table and role table by  Attribute column and Country column. Then follow the steps in https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple to create dynamic rls.

 

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

 

Best Regards,

Dedmon Dai

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
Top Kudoed Authors