Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Role level Security

Hi,

 

I want to create role level security. I have 4 role Admin, Manager, HR, Empolyee. Suppose I set admin level role they will show all records and when I set HR role they will be seen only employee records. I tried, but not achievable. see below image.

 

I tried with below DAX Function

 

If(search(username(),CONCATENATEX(FILTER(User_Application,User_Application[Role]="Admin"),User_Application[Mail],","),,-1)<0,[Mail]=username(),[Role]<>"")

&

If(lookupvalue(User_Application[Role],
User_Application[Mail],UserName())<>"Admin",
[Mail]=Username(),
[Role]<>"")

 

Role.PNG

 

Thanks In Advance.

Status: New
Comments
v-chuncz-msft
Community Support

@Anonymous 

 

Just use USERPRINCIPALNAME instead of USERNAME.