I'm trying to create RLS that will compare user1 with user1 because the domains are different. So if email is [email protected] and userprinciplename() [email protected], that should match.Some of the things I have tried, which aren't working:working
LEFT([Email], SEARCH("@", [Email]) - 1) = LEFT(USERPRINCIPALNAME(), SEARCH("@", USERPRINCIPALNAME()) - 1)
This gives user1 in a measure, not in rls -> not sure how to use it
UserName =
VAR _selemail = SELECTEDVALUE(Employees[Email])
VAR _aposition = SEARCH("@", _selemail, 1, LEN(_selemail) + 1)
RETURN
IF(_aposition > 1, LEFT(_selemail, _aposition - 1), _selemail)