Forum Discussion

DataSundowner's avatar
DataSundowner
Helper II
3 years ago
Solved

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 ...
  • jdbuchanan71's avatar
    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] )