Forum Discussion

tarunbisht20001's avatar
tarunbisht20001
Frequent Visitor
1 year ago

Need help with setting up Dynamic RLS on Hierarchy Data

I have a table RLS
it have two columns
email and project ID

now i have setup a role on table RLS as
[Email] = USERPRINCIPALNAME()


now i have a project table which is the main table in schema which contains all data
in Project i have two main columns
ID and Parent ID

ID contain project id and parent column contain id of parent project of particular project if exist, if any project is superparent than empty

now I have created a superparent column using path and few dax function

like
ParPath = PATH(PROJECTS[id],PROJECTS[parent_id])

SUPERPARENT = LEFT(
PROJECTS[ParPath],
SEARCH(
"|",
PROJECTS[ParPath],
,
LEN(PROJECTS[ParPath]) + 1
) - 1
)

I have a relationship between the RLS table and the Project table, linking Project ID to a custom Superparent column. However, this setup restricts access to projects that are not designated as Superparents.

When I updated the relationship between the RLS table and the Project table to link Project ID to Project ID, the filters stopped working, and nothing is being filtered.

Please suggest solutions and explain how I can verify and test the filtering process.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tarunbisht20001 ,

    Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster?

     

    If that doesn't solve the problem, could you please provide the relevant .pbix file or a link to it?

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.