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

RLS on DimUser?

This is a RLS question: I need to show the user’s own data and also Totals; but NOT data from any other specific user.

 

I have my Fact table with several measures, and my Users dimension (DimUser)

 

In the FILTERS, I have a “user name” filter, where all users shall select only see themselves. (there’s a few super-users who should select among all users…)

 

On my .pbix I show 2 visuals:

  • Visual 1: own’s user data,
  • Visual 2: shows totals for all users.

 

I am able to do this because  I use DAX’s  REMOVEFILTERS function.

 

How can I do the RLS I need? The user accessing shall see her/his own data and also totals; but not any other user specific data.

 

I am already doing the RLS in the USERS dimension using [username]= USERNAME()  but of course, its filtering all the way to my fact and my Visual2 gets messed and both visual display on the user's data...

2 REPLIES 2
JohnAPD
Frequent Visitor

You could either create multiple measures or use a calculation group (to change the filter context)

one that removes the filter (visual1) and one that does not (visual2) it may not be possible to have a mix of data in the same visual and maintain RLS

 

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Try using userprincipalname() function instead 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.