Forum Discussion
RLS multiple combination
- 7 years ago
I just remembered that I had to do something strange with my tables which required me to use the OR. For yours, you should be able to just use the following:
- On the company table - Company[PrincipalName] = UserPrincipalName()
- On the department table - Department[PrincipalName] = UserPrincipalName()
If it doesn't work for you I will work up a PBIX file that I can share to demonstrate what I am thinking.
Hi there,
I created Security roll and compusite key CDKEY = Company + Department to generate unique key Matching to UserPrincipalName Also I created companyDepartment combination table then I put this code (it seems working)
But I'm not happy with this solutions.
CompanyDepartment[CDKEY]= CALCULATE(
VALUES('SecurityTable'[CDKEY]),
SUMMARIZE(
SecurityTable,
SecurityTable[CDKEY]),
SecurityTable[PrincipalName] = UserPrincipalName()
)
I did try two tables like you showed but it did not work as expected , I will try one more time and let you know.
Can you elaborate a liitile bit more about your code?
Thanks,
Oded Dror
I just remembered that I had to do something strange with my tables which required me to use the OR. For yours, you should be able to just use the following:
- On the company table - Company[PrincipalName] = UserPrincipalName()
- On the department table - Department[PrincipalName] = UserPrincipalName()
If it doesn't work for you I will work up a PBIX file that I can share to demonstrate what I am thinking.