Forum Discussion
Configuring “all” access with dynamic row-level security
- 4 years ago
Hi Anonymous ,
Based on your description, please create a column to show the CEO of these Managers.
CEO = IF('Table'[Region]="ALL",BLANK(),CALCULATE(MIN('Table'[ID]),FILTER(ALLEXCEPT('Table','Table'[Country]),'Table'[Region]="ALL")))Then use PATH function to create a new column to show the whole path for the hierarchy:
PATH = PATH('Table'[ID],'Table'[CEO])Finally you can use PathContains functions to check if ID exists in a path or not,then you need to add this logic as a role in the table.
PATHCONTAINS('Table'[PATH], MaxX( Filter( 'Table', [Users]=USERPRINCIPALNAME() ) ,'Table'[ID] ) )Here are some helpful blogs for your reference:
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Based on your description, please create a column to show the CEO of these Managers.
CEO = IF('Table'[Region]="ALL",BLANK(),CALCULATE(MIN('Table'[ID]),FILTER(ALLEXCEPT('Table','Table'[Country]),'Table'[Region]="ALL")))
Then use PATH function to create a new column to show the whole path for the hierarchy:
PATH = PATH('Table'[ID],'Table'[CEO])
Finally you can use PathContains functions to check if ID exists in a path or not,then you need to add this logic as a role in the table.
PATHCONTAINS('Table'[PATH],
MaxX(
Filter(
'Table',
[Users]=USERPRINCIPALNAME()
)
,'Table'[ID]
)
)
Here are some helpful blogs for your reference:
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.