Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe 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.
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.
Hi, I am not able to follow. Can you explain again, please and thanks.
@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
User | Count |
---|---|
20 | |
17 | |
16 | |
11 | |
7 |
User | Count |
---|---|
27 | |
27 | |
13 | |
12 | |
12 |