Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to build a report where when users log in, their email filters their view automatically so their only see their or their staff's data.
I used PRINCIPALUSERNAME( ) as a measure to automatically show the email of whomever is viewing the report. I then used that as a filter for a second visual with all of the company's emails so it only shows the user's email. The second table works so that table pulls up only the viewer's email.
Is there an easier way to do this? The goal is to let whoever logs in only see their clients or the clients of those they supervise.
@amitchandak the problem is the email addresses come from a secondary table which has not been allowing me to filter the main table. I am trying to find an alternative method because the traditional RLS method was not affecting the main table.
@amitchandak I started with using dynamic RLS but when that did not work I looked into alternative routes to get the desired results. RLS roles are not filtering the data based on user (my user name sees everything and when I view as another user the filter does not affect the table).
The closest I can get is using IF(SELECTEDVALUE(Staff_Member[Staff_eMail_Address])=USERPRINCIPALNAME(),1,0) as a filter for the intermeding table but I cannot get the second table to filter the overall client count table.
@BW40 , We usually use RLS, we join table with table haviing access and email and then use code of first measure
example
[email]=USERPRINCIPALNAME()
Power BI- Row Level Security(RLS): Handle ALL, UserPrincipalName: https://youtu.be/KVLEnIUo4pc
For Hierarchy
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
78 | |
63 | |
52 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
61 | |
60 |