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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
eaj
Helper I
Helper I

RLS / Anonymize a certain column

How to anonymize a certain column for a certain usergroup? This is my model:

eaj_1-1683729270365.png

 

A user should always be able to see only their CostCenter. I've fixed that with an RLS function and a relationship between the tables RLS and Department [Username] = userprincipalname().

My issue is that for anyone with the flag asp_rep = 1 in my RLS-table, I need to somehow anonymize the name column in the Fact_Consultation table. I don't have a preferred method, but I'm thinking of using some sort of IF/Switch statement. However, that's where my knowledge stops. How could I achieve such a result? Data export, etc. is already limited for everyone, so it's enough if it's just a visual layer of security.

RLS-table

CostCenter Username asp_rep
111aaa.aaa@mail.com1
111bbb.bbb@mail.com0
222ccc.ccc@mail.com0

 
Wanted result when vieing the report as a user with asp_rep = 0

Name Sold amount
Tom Hanks5 185
Brad Pitt1 849
Jennifer Lawrence19 598
Emily Blunt17 874

 

Wanted result when vieing the report as a user with asp_rep = 1

Name Sold amount
1015 185
1021 849
10319 598
10417 874
1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @eaj 

 

Please refer to the following links in the hopes of helping you.

Solved: Dynamic RLS - Microsoft Power BI Community

Row Level Security with SSAS Tabular Live Connection in Power BI - RADACAD

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.