Forum Discussion
DataSundowner
3 years agoHelper II
RLS Retain Null Values for All Users
Hello everyone. I have a fact table with LocationID and a location dimention table that connects to LocationID in the facts table. Then I have a RLS table that has locationID and user email, and I'm ...
- 3 years ago
Hmm, try it like this.
VAR _UPN = USERPRINCIPALNAME () RETURN 'LocationDim'[locationID] IN CALCULATETABLE ( DISTINCT ( 'RLS'[locationID] ), 'RLS'[Email] = _UPN ) || ISBLANK ( 'LocationDim'[locationID] )
jdbuchanan71
3 years agoSuper User
What if you disconnect the RLS table and apply the RLS rule to the LocationDim table like this.
VAR _UPN = USERPRINCIPALNAME ()
RETURN
'LocationDim'[locationID]
= LOOKUPVALUE ( 'RLS'[locationID], 'RLS'[Email], _UPN )
|| ISBLANK ( 'LocationDim'[locationID] )