Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Power BI Gurus,
I was wondering if there is a way to set up RLS in this scenrio:
Permissions Table:
Employee | Entity |
name1@domain.com | Entity1 |
name2@domain.com | Entity2 |
name3@domain.com | Entity3 |
name4@domain.com | Entity4 |
Fact Table structure:
Entity Initiating | Entity Impacted | DataField1 | DataField2 |
Entity1 | Entity3 | 2 | abd |
Entity2 | 5 | dgs | |
Entity4 | Entity1 | 123 | kjl; |
Entity4 | Entity4 | 86 | jhk |
Entity3 | Entity2 | 687 | ghkg |
I need Employee to be able to access if their entity is either Initiating or Impacted?
I've done "straighforward" set up before where i'd only have one Entity column, but here I am stuck
Thank you!
Solved! Go to Solution.
Hi @ogend ,
According to your description, Here's my solution.
Don't make relationship between the two tables. In Manage roles, create a new role with two DAX filter expression:
1. Permissions Table.
[Employee] = USERPRINCIPALNAME()
2. Fact Table.
[Entity Initiating] =
MAXX (
FILTER (
'Permissions Table',
'Permissions Table'[Employee] = USERPRINCIPALNAME ()
),
'Permissions Table'[Entity]
)
|| [Entity Impacted]
= MAXX (
FILTER (
'Permissions Table',
'Permissions Table'[Employee] = USERPRINCIPALNAME ()
),
'Permissions Table'[Entity]
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
Hi @ogend ,
According to your description, Here's my solution.
Don't make relationship between the two tables. In Manage roles, create a new role with two DAX filter expression:
1. Permissions Table.
[Employee] = USERPRINCIPALNAME()
2. Fact Table.
[Entity Initiating] =
MAXX (
FILTER (
'Permissions Table',
'Permissions Table'[Employee] = USERPRINCIPALNAME ()
),
'Permissions Table'[Entity]
)
|| [Entity Impacted]
= MAXX (
FILTER (
'Permissions Table',
'Permissions Table'[Employee] = USERPRINCIPALNAME ()
),
'Permissions Table'[Entity]
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
@ogend , You need to create two copies of the permission table, Join one with each. Then make two roles and assign both to the users. Two roles are OR
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |