Forum Discussion
DAX command to consider multiple =USERPRINCIPALNAME values in same column
We have a single table that we're using currently to set the RLS / DAX statement against. It is working great.
Email = UserPrincipalName() , very straightforward.
Use case now is allowing multiple users to see the same data. I've read through many of the existing workarounds for this. Is there a way to use Contains or another command that would leave our current schema in tact? Ideally would like to have multiple user names in the same field separated by comma or other delimiter.
Thanks for any insight.
3 Replies
- amitchandakSuper User
Not very clear on the need. See RLS groups can help
- lbendlinSuper User
Your single table is the right approach. But it doesn't mean each of your users has to appear only once in it. 😀
- nandukrishnavsCommunity Champion
Assuming that your data is similar to below.
Store Email Store1 [email protected];[email protected] Store2 [email protected] Store3 [email protected] Store4 [email protected];[email protected] Then you could try below DAX in the RLS window.
VAR __email = USERPRINCIPALNAME() VAR __condition = IF ( CONTAINSSTRING ( 'Table'[Email], __email ), TRUE (), FALSE () ) RETURN __condition