Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 14 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |