Forum Discussion
jessset
5 years agoHelper I
Cross Filter None Alternative for Row-Level Security
Hi there, I currently have a measure as below which works fine when RLS is not activated (I need to deactivate the relationship for this particular measure. CALCULATE(COUNT(Sales[SalesID]),CROS...
edhans
5 years agoCommunity Champion
CROSSFILTER works fine with RLS in import mode. You are likely using DirectQuery. TREATAS() will not change the model the way CROSSFILTER will. This is one of many reasons not to use DirectQuery - so many limitations in DAX.
- jessset5 years agoHelper I
Thanks edhans!
I've just checked my data model again and can confirm I'm not using any Direct Queries, I've imported all my queries.
This is the error I get when I turn on a role:
"The UseRelationship() and CrossFilter() functions may not be used when querying 'Sales' because it is constrained by row-level security defined on 'XLS_Branch' or related tables."I've managed to find a workaround by using ALL() function. Thanks!
- QuyenHoang2 years agoRegular Visitor
Hi Jessset,
Can you elaborate on the operation using All() instead of CROSSFILTER()?