Forum Discussion
Role Level Security Dax Measure - looking at different fields to determine access
Unfourtnaly we have 4 levels not 1. Provider can only see their own data (NPI), clinic manager can only see dept assigned, director need to see multiple specialties (rolls up 10+ dept into 1 speciality) and RPT_GRP_2 it a level above the specialties that groups specialties for higher up levels. That is why I am trying to find a way to evaluate more then 2 things in my logic. That code I have works amazing for department and speciality I just dont know how to exand to look a more than 2 things.
- Anonymous4 years agoNot applicable
Hi amarquiss ,
If there are same logic in level RPT_GRP_TWO and NPI_ID, you can try the code as below.
VAR Specialty = CALCULATETABLE ( VALUES (SecurityAccess[SPECIALTY]), SecurityAccess[USER EMAIL] = USERPRINCIPALNAME() ) VAR DEPT_ID = CALCULATETABLE ( VALUES ( SecurityAccess[DEPT_ID] ), SecurityAccess[USER EMAIL] = USERPRINCIPALNAME() ) VAR RPT_GRP_TWO = CALCULATETABLE ( VALUES ( SecurityAccess[RPT_GRP_TWO] ), SecurityAccess[USER EMAIL] = USERPRINCIPALNAME() ) VAR NPI_ID = CALCULATETABLE ( VALUES ( SecurityAccess[NPI_ID] ), SecurityAccess[USER EMAIL] = USERPRINCIPALNAME() ) RETURN OR ( "ALL" IN DEPT_ID, DimDeptClarity[Department Id] IN DEPT_ID ) && OR ( "ALL" IN Specialty, DimDeptClarity[Specialty] IN Specialty ) && OR ( "ALL" IN RPT_GRP_TWO, DimDeptClarity[RPT_GRP_TWO] IN RPT_GRP_TWO ) && OR ( "ALL" IN NPI_ID, DimDeptClarity[NPI_ID] IN NPI_ID )It seems that you want to build dynamic RLS with hierarchy level. You may refer to this blog to learn more details.
For reference: Dynamic Row Level Security with Organizational Hierarchy Power BI
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.