Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |