Forum Discussion
Row Level Security (RLS) Causing 1,000,000 record error when in use
I am having a similar issue. Were you able to resolve it?
Sadly not the way you are probably hoping.
I found out that Power BI RLS pulls ALL of the data into your model and then applies RLS. Instead of sending the RLS query to the source and only pulling what is needed.
I tried several methods to get it to send the request to the server first but nothing worked.
So what we ended up doing was probably a little more complex but works great for us.
We turned the model into an import model. Then we scripted the model out to XMLA so we had the XMLA script (login to SQL Server, connect as Analysis DB, right click and script as...).
Took that script and put in variables in places like name/id/parameters.
Used XMLA endpoint and C# to code a method that basically allows us to split our model out between clients however we see fit. So basically we can put 1 large client in their own model, 5 small ones in a shared model that has RLS. Used the REST API scripts extensively for this.
Ended up being a lot more work than what I originally tried to do but it is working like a charm.
Good luck ,if you do find an answer please respond back... would be nice to know for the future!