The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
106 | |
97 | |
55 | |
49 | |
46 |