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 dont know if TREATAS is an valid replacement from Microsoft, but in my models have switched to TREATAS and it seems to work as UseRelationship used to work before. (No error messages or changed behaviors).
MarkDenHeijer Can you please send the syntax for this replacement? I am not sure if I understand it correctly. THANK YOU
- MarkDenHeijer1 year agoFrequent Visitor
The quickest way is to ask co-pilot or chat-gpt to just rewrite the measures for you. This prompt works for me:
I want to rewrite measures in PowerBI. For every measure I give you, I want you to replace the USERELATIONSHIP by a TREATAS version.
Please add the supplied query in the end and place them between /* and */.
This is the first measure I want you to rewrite:{and then you paste your dax measure here}. You can keep copying pasting new measures.
- mostvp1231 year agoKudo Collector
A note that while the TREATAS function will give you the same result, the performance will be much slower than USERELATIONSHIP. TREATAS is creating a "virtual" relationship which is more compitationally intensive. This may not matter if your model is small, but if you have a complex model (like I did) this would not have been feasible.
In my case duplicating my dimensional table which had the RLS applied to it, one time for each role, and then using an active relationship to my fact tables instead, worked great and actually improved the performance of my model. Dimensional tables are usually small so the duplication did not increase my file size much at all.- AlexNL1 year agoAdvocate II
Thank you for your reply. Performance is very important in our organization. Therefore the TREATAS function is not a solution for us unfortunately. Also the second solution not. It is perhaps too difficult for me to explain in short. Our situation: There is one group of people who can see everything and a second group who can see everything EXCEPT one table which they cannot access. The optional relationship between that special table and the fact table is essential because otherwise the second group will not see anything at all because Power BI always actives all relationships. Even if you do not select an item (column) from a table. So it's like 'all' or 'nothing'.
The USERELATIONSHIP was perfect for this.