March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I would like to set the SLICER default in the report with the RLS, but I would like to thank you for the function.
Name | Dept | Scope of Authority | Default Slicer |
Eric | president | All | HR |
Tom | HR | dl | HR |
Josh | R&D | R&D | R&D |
Stella | Sales | Sales | Sales |
<RLS scenario>
1) If an ERIC with full privileges comes in, HR is selected and sliced.
2) Other people should be chosen by their own.
<Issue>
1) If DEPT is made by 'single selection' with HR for the entire permissions, HR is selected when the JOSH is connected to the report.
-> I want to make this part of R & D, not HR.
Thank you for telling you how to do it.
Hi @ericjo ,
The solution provided by grazitti_sapna is feasible, can you provide relevant screenshot information as well as test data and describe it?
DefaultSlicerValue =
VAR CurrentUser = USERNAME()
RETURN
MAXX(
FILTER(
'UserTable',
'UserTable'[Name] = CurrentUser
),
'UserTable'[Default Slicer]
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ericjo,
To handle default slicer settings in Power BI reports with RLS, you can use measures to dynamically set the default slicer values based on user roles. Here's how to achieve your goal:
DefaultSlicerValue =
VAR CurrentUser = USERNAME() -- Or USERPRINCIPALNAME() for email-based RLS
RETURN
MAXX(
FILTER(
'UserTable',
'UserTable'[Name] = CurrentUser
),
'UserTable'[Default Slicer]
)
Add RLS Rules
Implement RLS rules on the UserTable to ensure that users can only see their respective rows.
For example:
Filter the UserTable so that each user can only see their own row.
Eric (President) should have access to all departments, while others are limited to their department.
RLS filter example for the UserTable:
[Name] = USERNAME() || [Scope of Authority] = "All"
Set Up the Slicer
Add the Dept column to your slicer.
Use a sync slicer if you have multiple pages.
Enable Single Selection in the slicer settings.
Use a Bookmark for Default Slicer Behavior
Create a bookmark to reset the slicer to the default value:
Set the slicer to the default value (e.g., HR for Eric).
Save this as a bookmark.
For users without Eric's access, the slicer will automatically be filtered by their department due to the
RLS and the DefaultSlicerValue measure.
Expected Behavior
Let me know if you need help setting this up!
If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.
Thank you for informing me, and I tested the RLS based on the contents.
<Additional>
1. SLICER should be selected as DEAFULT settings.
-> If the report is posted on the basis of ERIC, the slicer is fixed to 'hr' when connected to Stella, and the figures are not available.
-> 'Sales' should be selected when connecting to Stella.
<Example IMG>
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
122 | |
87 | |
75 | |
68 | |
51 |
User | Count |
---|---|
205 | |
141 | |
100 | |
79 | |
68 |