Insights / RLS in Power BI / Part 10
Part 10 of 20 · Test itHow to test RLS performance in Power BI
The problem. RLS is set up. Did you check what it costs your report?
Why. RLS adds a filter to every DAX query, so it can slow visuals down.
Quick check, in Power BI Desktop (Performance Analyzer):
- Start recording, refresh visuals, and note each visual's DAX query time with no role.
- Modeling → View as → pick the role.
- Record again. The gap for each visual is what RLS costs.
Deeper check, in DAX Studio:
- Connect to the model. You connect as an admin, so RLS is off until you turn it on.
- On the Advanced tab, use View As: pick the role, and for dynamic RLS enter a real email from the security table.
- Turn on Server Timings. Clear the cache before each run.
- Compare storage engine time and query count, with and without the role. A big jump there means expensive relationship joins.
Making it faster:
- Filter dimension tables, not the fact table.
- Use relationships in the rule, not LOOKUPVALUE over big tables.
- Use two-way filtering only on small tables. Security ↔ DimRegion both ways is fine because both tables are tiny.
- Keep the security table small, with integer keys.
- On DirectQuery, tune the source (indexes).
- Only a few fixed audiences? Separate models can beat RLS.
Check before go-live
- Main pages were timed with and without each role
- Two-way filtering is only on the small security relationship Desktop
Want a second pair of eyes on your own model? The RLS review checks your roles, relationships and workspace access against this checklist, at a fixed price.