Approach 2- No physical relation. Using DAX at the RLS level:
VAR Useremail=USERNAME()
VAR Usercompany = SELECTCOLUMNS(FILTER(ALL('Users'),
'Users'[Username]=Useremail),"RA",[Company ID])
Return
[Company] IN Usercompany
I run into the same issue regardless of the method used. I’m adding a sample pbix file for reference. If Bi-Directional joins are applied in the model, then this is no longer and issue.
@jafernandezpuga Thank you for your solution. I have gone through your solution and can confirm it works although I am yet to implement this into my master report.
Before I implement this, I would like to understand the solution better and have a few questions:
What is the purpose of the junction table ‘Users-Companies’?
Why is there a need for an inactive relationship between companies and user companies?
Implementing the RLS DAX at the Applications-Companies or at Companies causes the join path tree error i originally had but not when it is at the Stock Location. Why is this the case?
To remove the error I had to create a blank page and redo the visuals.
Searching in google I found some links in which he talks about this problem and I see that the reason is not clear since there really is no double path.