Rules / Performance

Limit row level security (RLS) logic

warning LIMIT_ROW_LEVEL_SECURITY_(RLS)_LOGIC · ported · scope: Table, CalculatedTable

What it checks

Tables whose row-level security filter, in any role, calls RIGHT, LEFT, UPPER, LOWER, or FIND.

Why it matters

A security filter runs on every query from every user in the role, and string functions in it are evaluated row by row on the secured table. A filter that compares a precomputed key column with equals is applied as a lookup instead. The string logic usually exists to derive a key from an email address or a code, which the source can produce once at load.

How to fix it

Add the derived key as a column in Power Query or in the source, and write the filter as a plain comparison such as [Email] = USERPRINCIPALNAME() or [Region Key] = LOOKUPVALUE(...).

Quirks

Links

Check a model for this Improve this page