Forum Discussion

alisaleh's avatar
alisaleh
Icon for Helper II rankHelper II
4 years ago
Solved

UseRelationship() and RLS constrained

Hi All,

I'm stuck with the following error

The UseRelationship() and CrossFilter() functions may not be used when querying ‘TableA’ because it is constrained by row-level security defined on ‘TableA’ or related tables.

All I did is I created a measure on some table (TableX) that has inactive relationship (1:*) to TableA, since the relationship is inactive I used the the Userelationship function inside the calcuate. It worked for me but when I publish it other uses get the error above? I understand that both tableA and tableX have active relationship to the Project table which where the RLS filter is being applied. I need both relationship to exist to the project. How can I solve this?

Thanks for the help.

  • alisaleh you can also use the technique defined in this blog post Solving RLS Gotchas – Prologika

     

    ✨ Follow us on LinkedIn and  to our YouTube channel

    I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    ⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.