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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Brettp761
Advocate II
Advocate II

Role-Based Default Filter Context

Hi,

 

I've written a technical paper on implementing role-based default filter contexts in SSAS Tabular, Power BI, and Power Pivot models and made this available for download:

 

Default Filter Context

 

This design avoids high levels of personalization required by users but still allows users to apply their own filters (after being defaulted to a certain filter). Feedback from business users has been very positive so far and it's relatively easy to setup and maintain.

 

Regards,

Brett

5 REPLIES 5
aparnasekar
New Member

Hi,

I have a table in which different roles and the members corresponding to each role are mentioned.
Example: TableName : Roles
Capture.PNG
I have few visualizations for data like sales details, revenue etc. all these tables have a foreign key from the role table.
Now i need to take each role from the table 'Roles' and show hide visualizations based on roles. for ex: manager should see the revenue details where as the sales person should not. Also, enforce row level security to all the users in this table like each sales person should see the sales details related to them only.

Is there any way where the users can be automatically pulled from this table rather than explicitly mentioning in the Security ta of PBI Server.

How can i enforce these conditions in PBI ? Please advice.



Thanks in Advance!

Aparna Chandrasekar

Please let me know if there any solution available @aparnasekar ... i am having same situation where need to show different visualizations based on roles.

aparnasekar
New Member

Hi Brett,

I have my roles and usernames corresponding to the roles defined in one table. 

Is there anyway by which i can check the user role dynamically from this table and filter the data accordingly(rather than manually entering each user name in the RLS members list.

 

 

Thanks

Aparna

jadhav_vilas84
Advocate II
Advocate II

Hi , I had create role ...from manage role using table role master on base role_ID base , it is working fine on test as role . I had added some users email id for this role. but when I login with these users... dashboard report data or in report data is not dynamically filter. Please help for how to apply row level security using power Bi desktop application. thanks vilas jadhav

Reza Rad wrote two very good blog posts on applying row level security in PBI Desktop including dynamic RLS:

 

http://radacad.com/row-level-security-configuration-in-power-bi-desktop

 

http://radacad.com/dynamic-row-level-security-with-power-bi-made-simple

 

For PBIX models deployed to PBI Service (not on-premises SSAS instances) be aware of USERPRINCIPALNAME() and differences with USERNAME() per following post:

 

http://prologika.com/new-userprincipalname-dax-function/

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors