Forum Discussion
Charu
8 years agoPost Patron
Dynamic RLS role creation based on Login name
Hi Everyone, Based on the user logged in for them their own record and the person who is reporting to the logged in user those details also should display How to compare the logged in username ...
- Anonymous8 years ago
Charu,
In your scenario, create two roles, one using the DAX below. In Power BI Service, add Ajay as member of this role.1=1
Another using DAX below.[Email_address] = USERPRINCIPALNAME()
Regards,
Lydia
Anonymous
8 years agoNot applicable
Charu,
Create a new column in your table using DAX below.
is manager = IF(Table[Reporting_To_Name]="",1,0)
Create the role using DAX below.
If(MaxX( Filter( Table, Table[Email_address]=Username()) ,Table[is manager])=0, Table[Email_address]=Username(), 1=1 )
Reference:
http://radacad.com/dynamic-row-level-security-with-manager-level-access-in-power-bi
Regards,
Lydia
- Charu8 years agoPost Patron
HI Anonymous
I'm getting the following error message as
Function 'MAXX' is not allowed as part of the row level security expression on DirectQuery models