DanielFrins
DanielFrins

Reputation: 47

Power BI Row-level security (RLS) if PART of a field is matched (not the entire field)

I have setup my RLS quite successful. I collect the user who is logged on, have setup roles and also manage to limit rows to use in the reporting. There is a field, that contains the row's responsible person ([email protected]).

The DAX filter [RowResponsible] = [UsersEmail] works just fine.

The thing is, that the [RowResponsible] may contain multiple values. For example [email protected];[email protected].

The DAX filter [RowResponsible] = [UsersEmail] will no longer work, obviously. I'd like to be able to use some form of 'contains' in this filter, but SEARCH / CONTAINSSTRING will not do the trick (they seem to be not supported). DAX Expression

Any thoughts?

Upvotes: 0

Views: 1159

Answers (1)

mkRabbani
mkRabbani

Reputation: 16908

This following code should work for you as I am using a same code for one of mine RLS and its working fine-

CONTAINSSTRING(
    [RowResponsible],
    [UserEmail]
)

Upvotes: 1

Related Questions