Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Requirement is if following condition meets then only RLS should apply else RLS wont apply and user sees entire data.
following code not working id condition is meeting still user seeing entire data and RLS not applying. this all logic from single table which is filtering the data to fact and connected. workaround ? extratable ? Column ?
= IF(
(
(CONTAINSSTRING([terr_id], "SCC") || CONTAINSSTRING([terr_id], "SNN"))
&& [terr_type] = "Territory"
),
LOWER(TRIM([emp_email])) = LOWER(TRIM(USERPRINCIPALNAME())),
TRUE()
)
Your condition translates into
=
IF (
( CONTAINSSTRING ( [terr_id], "SCC" ) || CONTAINSSTRING ( [terr_id], "SNN" ) )
&& [terr_type] = "Territory"
&& LOWER ( TRIM ( [emp_email] ) ) <> LOWER ( TRIM ( USERPRINCIPALNAME () ) ),
FALSE (),
TRUE ()
)
This may not be what you intended. You are also mixing static and dynamic RLS, which makes it even more complex.
Its dynamic only. following logic is working but the issue issue when the condition doesnt meet like [terr_id] <>"SCC", I want user to see entire data but with this logic user not seeing any data
That's not how dynamic RLS works. You are supposed to hold a permission mapping table that is keyed off the USERPRINCIPALNAME and then controls the rest of the data model.
You don't seem to have the required dimension tables for this?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |