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.
Hi there,
I have three tables with example data as below.
On my report, I just want to allow user to see only data of invoices which products belong to their department and it will be based on the employee data generated automatically. It means that whenever having new employee I don't need to assign them manually.
What should I do on DAX to create roles for this purpose?
Thanks
Product | Department |
A | Sales |
B | MKT |
C | MKT |
D | Sales |
E | Supply Chain |
F | Sales |
Invoice_ID | Value | Product |
1 | 1000 | A |
2 | 1500 | C |
3 | 2000 | F |
4 | 3500 | D |
5 | 2000 | A |
6 | 500 | B |
Emp_id | Department | |
X | x@abc.com | Sales |
Y | y@abc.com | MKT |
Z | z@abc.com | Supply Chain |
Solved! Go to Solution.
In your RLS create roles per department.
Each role should filter the Product Department table.
Role membership should be the distribution list of all department users.
Note: This is static RLS, not dymanic RLS.
Thanks to @lbendlin for the detailed steps.
Hi @quynhphan ,
I have added an example for this, which I hope will help you understand and solve the problem better:
Relationship:
1.Manage roles, create three roles for three departments.
[Department] = "Sales"
[Department] = "MKT"
[Department] = "Supply Chain"
2.View as roles.
output:
In Power Bi Service, add groups who belong to the role.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks to @lbendlin for the detailed steps.
Hi @quynhphan ,
I have added an example for this, which I hope will help you understand and solve the problem better:
Relationship:
1.Manage roles, create three roles for three departments.
[Department] = "Sales"
[Department] = "MKT"
[Department] = "Supply Chain"
2.View as roles.
output:
In Power Bi Service, add groups who belong to the role.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In your RLS create roles per department.
Each role should filter the Product Department table.
Role membership should be the distribution list of all department users.
Note: This is static RLS, not dymanic RLS.
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |