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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors