cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Toufique
Frequent Visitor

using slicer to highlight only the values of the selection

Hi, 
I know the basic concepts of Row Level Security (RLS) where selected users can see only their relevant data while other users data will be completely blinded. But I want to show other users data to the selected user while their name will be blinded but not the data values. So, the idea is when I select a user from the slicer it will show PBI visuals with the relevant data of all users but mask will other users name. Not sure if it can be doable in other ways, feel free to share your ideas here

here is the following visual that I want to implement:

 

 

 

with the selection of any user from the slicer the box plot will show up the user  name only but other users will be still there as blinded with their values.with the selection of any user from the slicer the box plot will show up the user name only but other users will be still there as blinded with their values.Screenshot 2023-06-21 174605.png 

1 ACCEPTED SOLUTION

Check the attached file for the pattern you need. For the bi-directional relationship, it's important to turn on the setting that security is applied in both directions.

 

The security role that you need to apply is "Blinded Users".

 

The users that you can test are:

 

user.a@test.com

user.b@test.com

user.c@test.com

 

Check this video if you need instructions how to test dynamic row level security with users in Power BI Desktop: https://www.youtube.com/watch?v=_AxXeGoqHg4

 

Security for user.a@test.com appliedSecurity for user.a@test.com applied

View solution in original post

6 REPLIES 6
Martin_D
Super User
Super User

You can't solve your problem this way and you should not solve your problem this way. RLS is called row level security because it either includes or excludes a whole row based on security roles. Since your data structure contains clear name and blinded name in the same row, you cannot hide one but not the other with this structure.
According to Roche's maxim, it's recommended to solve data problems as far upstream as reasonably possible. That means, in the context of Power BI, and if you cannot solve it even before Power BI, solve in Power Query what you can solve in Power Query, not in DAX. A suitable data structure is the foundation of good, working, well performing DAX code. We see a lot of DAX questions and cumbersome solutions that result from failing adherence to Roche's maxim. Don't take them as a role model.

 

github.pnglinkedin.png

Thanks! that make sense, will keep that in mind to the implementation of the RLS in future.

Martin_D
Super User
Super User

Can you provide a drawing what the visual looks like without blinding the names and what it would look like with blinded names. Since I can't see names in the box plot, I do wonder what you want to blind? Can you provide the sample file in addition?

Yes, Sure! So, here you can see the slicer has no selection and the table is showing all the values without blinded.So, here you can see the slicer has no selection and the table is showing all the values without blinded.However, here when I select one of the user name on the slicer, it just showing up the values related with the selection. Rest of them are blinded.However, here when I select one of the user name on the slicer, it just showing up the values related with the selection. Rest of them are blinded.

 

I want to apply this same on my visuals i.e. box plot. I cannot use measure as axis for the box plot or other visuals. here is the following my Dax code for the measure:

dynamic_label = IF(
    max(temp_memorial_final[.........]) IN ALLSELECTED(temp_memorial_code[........]),
    max(temp_memorial_final[............]),
    max(temp_memorial_final[........])
    )


 

Check the attached file for the pattern you need. For the bi-directional relationship, it's important to turn on the setting that security is applied in both directions.

 

The security role that you need to apply is "Blinded Users".

 

The users that you can test are:

 

user.a@test.com

user.b@test.com

user.c@test.com

 

Check this video if you need instructions how to test dynamic row level security with users in Power BI Desktop: https://www.youtube.com/watch?v=_AxXeGoqHg4

 

Security for user.a@test.com appliedSecurity for user.a@test.com applied

@Martin_D , Thanks for your solution. However, my dataset is slight different than your example, like, I do have different column for the users that are blinded. in that case, I was wondering to figure out the changes of Dax for RLS. here is the following my dataset look like: image.png

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors