Forum Discussion
RLS and USERELATIONSHIP problem
- 1 year ago
Hi ju97,
Thank you for bringing this issue to our attention. We understand that the error related to the UseRelationship() and CrossFilter() functions has recently impacted your report, despite it functioning well previously.
As this is a known issue that is currently being addressed, we are unable to keep this thread open indefinitely.For official updates, you can check for more information through the provided link : Known issue - Reports that use functions with RLS don't work - Microsoft Fabric | Microsoft Learn
In the meantime, if you continue to experience difficulties, we kindly encourage you to create a new thread. This will allow us to assist you more effectively.
Thank you for your understanding, and please know that we are here to help!
Best regards,
Atheeq.
I have been writing with MS support and the reply is:
"USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included."
"so please try to avoid those functions"
Also see this https://learn.microsoft.com/en-us/dax/userelationship-function-dax#remarks
So it is not a bug ...
I don't know that to do....
To memory - the purpose of this error is to prevent exposing data to users which they should not see, if there is an active relationship between a dimensional table where RLS is applied, and fact tables in the model. The active relationship propagates RLS from the dimensional table to the fact table. If there was a second, inactive relationship, between the dim table and fact table, trying to enable by using USERELATIONSHIP would cause the error.
However, if there was no active relationship between the two tables (for example, two inactive relationships), USERELATIONSHIP would still work fine. I'm guessing because the lack of an active relationship means RLS is no longer propagating any filters to the fact tables. That is how my model is structured. It seems such a setup is no longer working since this bug started, and in my view, there should be no reason for that. It is almost as if any usage of USERELATIONSHIP between a dimensional table with RLS and fact table is now banned. We need this changed reverted as soon as possible, it also severely limits the usefulness of this formula.