Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Bug report

Here is the bug report Super User Idrissshatila wanted me to post in this channel:

 

MAJOR bug as reported in thread: https://community.fabric.microsoft.com/t5/Service/RLS-and-USERELATIONSHIP-problem/m-p/4367418
RLS and USERELATIONSHIP / CROFFILTER problem.
Crucial reports all over the continent are bugging out.
According to user, 11 pm Swedish CET+1, everything worked fine, but suddenly this error occurs:

Error message example:
"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"

Another bug report for same issue:
https://community.fabric.microsoft.com/t5/Service/Sudden-RLS-and-USERELATIONSHIP-problem/m-p/4367400...

Status: Delivered

Hi All,

These problems arise by design. As mentioned in the public documentation, USERELATIONSHIP cannot be used when defining row-level security for tables containing metrics, and CROSSFILTER is not supported in DirectQuery mode when used in computed columns or row-level security (RLS) rules.

USERELATIONSHIP function (DAX) - DAX | Microsoft Learn
CROSSFILTER function - DAX | Microsoft Learn

To resolve this issue, CROSSFILTER and USERELATIONSHIP can be removed from their metrics.Alternatively, the relationship can be modified as suggested by the public documentation of the RLS model.

Best regards,
Albert He

 

Comments
FedeMosquera
Frequent Visitor
Hi everybody, What we did in my company with a report was to use TREATAS instead. There were about 40 measures that needed to be changed from USERELATIONSHIP to TREATAS, for which I used Microsoft Copilot with the following prompt "I'm going to give you DAX measures that have the USERELATIONSHIP and I want you to give back the same DAX measure but using TREATAS instead".