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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
vini_udenia
Helper I
Helper I

Row Level Security to be excluded from some visual

Hi,

I need to implement security wherein the data should be filtered based on the user logging in:

Level 1 -- Director: All Data 

Level 2 -- Country Head: Data for managers reporting to him + Few visuals which are at Organization level

Level 3 -- Managers: Data for himself/herself + Few visuals which are at Organization level

 

I'm able to achieve the first part using RLS. Not able to prevent Row level security from being applied to the visuals which are at Organization level.

 

Few solutions online suggest to create a copy of the dataset (Dataset 2) for the organization level visuals, tried doing this but then the report filters (created using Dataset 1) do not work on the visuals (created on Dataset 2). If I create a join between the 2 datasets then RLS gets applied to Dataset 2 as well. 

1 ACCEPTED SOLUTION

@vini_udenia I am not aware of any functionality at this point that allows RLS on toggling visual objects on the page... You would only be able to accomplish this by using variations of the report. ie, creating multiple reports.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

One solution is to use USERELATIONSHIP() in a measure and have two dublicate dimensions tables, one with RLS and one without, then use USERELATIONSHIP() to change the dimension table to the one with RLS for the visuals you want filtered.  

 

CALCULATE( Measure , USERELATIONSHIP( Data , RLS dimension)) 

v-lid-msft
Community Support
Community Support

Hi @vini_udenia ,

 

We can use measure as a visual filter as a workaround which will work in some situation:

 

15.PNG16.PNG

 

Then we create a measure and use in the visual filter:

 

FilterByName =
IF (
    ISFILTERED ( 'Table'[Name] ),
    IF ( SELECTEDVALUE ( 'Table 2'[Name] ) IN FILTERS ( 'Table'[Name] ), 1, -1 ),
    1
)

 

13.PNG14.PNG

 


BTW, pbix as attached.

 

Best regards,

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

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

Hi, Can you please elaborate this solution a bit further.

@vini_udenia I am not aware of any functionality at this point that allows RLS on toggling visual objects on the page... You would only be able to accomplish this by using variations of the report. ie, creating multiple reports.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thanks Seth! I've tried this option and it works to have 2 sepearte reports in this case.. Now hoping the user agrees! 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors