Forum Discussion

BeginnerBob's avatar
BeginnerBob
Frequent Visitor
8 years ago
Solved

Row Filter on Role

Hi,

 

I have a column labelled UserID in my Site dimension which has many user accounts i.e. [email protected], [email protected] etc.

 

I want to have a DAX expression which searches the string and filters the row based on the current user.

 

I have created a Role called SiteUsers and have added the applicable users into this role. Then in my row filter I've added: SEARCH(USERNAME, [UserID], 1, 0 ) > 0

 

For example:

 

Site        UserID

North    [email protected], [email protected] 

South    [email protected]

East       [email protected], [email protected]

 

So if my user is [email protected] I want to return North and East.

 

This isn't currently working as all sites are returned when published.

 

Any ideas would help.

 

Thanks,

Bob

 

  • BeginnerBob,

     

    The following DAX filter expression works for me.

    SEARCH(", " & USERPRINCIPALNAME() & ",", ", " & [UserID] & ",", 1, 0 ) > 0

1 Reply

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Community Support

    BeginnerBob,

     

    The following DAX filter expression works for me.

    SEARCH(", " & USERPRINCIPALNAME() & ",", ", " & [UserID] & ",", 1, 0 ) > 0