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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Pker_Tank
Regular Visitor

Power BI Slicers appearance on the report based on User RBAC Policies

Hi all,

 

I have this interesting use case, which I am seeking help in solving it. I hope you guys can provide some valuable input.

 

Use Case:

My Report has two slicers. When users A and B view the report on the Power BI service, they should be able to see and use the slicers. 
Other users, should not see those slicers at all when they view the report. It should be hidden or something as it is restricted for other users.

 

Can you explain, how to achieve it.

 

Thanks heaps.

3 REPLIES 3
Pker_Tank
Regular Visitor

Hi, I am not able to follow. Can you explain again, please and thanks.

BeaBF
Super User
Super User

@Pker_Tank Hi!

To achieve this functionality in Power BI, where certain slicers are visible only to specific users while being hidden from others, you can utilize Row-Level Security (RLS) along with custom report design techniques. Here’s how you can do it step by step:

1. Create Roles for Row-Level Security
Define roles in Power BI that determine which users are in Group A (users who can see and use slicers) and Group B (users who cannot).

Go to Modeling > Manage Roles in Power BI Desktop.
Create roles, for example:
SlicerUsers (for users A and B)
NonSlicerUsers (for other users)

Assign logic to filter the data based on user email or other identifiable criteria, such as:
[UserPrincipalName] = "userA@domain.com" || [UserPrincipalName] = "userB@domain.com"
Replace UserPrincipalName with the appropriate field that identifies the users.

2. Create a Control Table for Slicer Visibility
Create a table that controls whether slicers should appear based on the user group.
Create a new table in Power BI with two columns:

Role (e.g., "SlicerUsers", "NonSlicerUsers")
SlicerVisibility (e.g., 1 for visible, 0 for hidden)
Example table:
Role SlicerVisibility
SlicerUsers 1
NonSlicerUsers 0
Relate this table to your existing data model if needed.

3. Use Conditional Formatting for Slicer Visibility
Control the slicer’s visibility based on the user role.
Add a measure to your model that calculates slicer visibility:

SlicerVisible =
IF(
SELECTEDVALUE(ControlTable[SlicerVisibility]) = 1,
1,
0
)
Use this measure to conditionally format or control the slicer objects on the report. For example:

Use the measure to filter a visual that contains slicer-related data.
Set the slicer to show only when the measure evaluates to 1.

 

BBF

@Pker_Tank if it works, please accept the answer as solution to help other users

 

BBF

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.