The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |