Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone, I have three tables:
- Sales (including a field called AgentID)
- ADUsers (picking up from the Active Directory Domain) where my agents are. There's a field called UserEmail.
- UserAgentID which I maintain: it has the AgentID and the UserEmail associated.
There's a relationship between the three of them. I would like to apply dinamically the AgentID filter on the Sales table depending on the AD user logged in PBI Service. How can I achieve this?
For example:
Sales Table
AgentID | Value |
123 | $ 150 |
456 | $ 200 |
789 | $ 75 |
ADUsers
UserEmail |
john.green@aaa.com |
mary.white@aaa.com |
tracy.brown@aaa.com |
UserAgentID
UserEmail | AgentID |
john.green@aaa.com | 123 |
mary.white@aaa.com | 456 |
tracy.brown@aaa.com | 789 |
If john.green@aaa.com logs in, I would like PowerBI to apply the filter "AgentID = 123" automatically in order to show only $ 150.
Many thanks,
Damiano
You need to use Row-level security (RLS) with Power BI. The conditions are set in Desktop mode and then permissions are given in PBI services (cloud).
Quick and simple to set up. Take a look at the following information. Essentially, you will create locked filters depending on the user accessing the dashboard at the time.
User A can only see Data with Filter A
User B can only see Data with Filter B
etc..
https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls