Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
cdavisUser
Regular Visitor

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 3
nandukrishnavs
Community Champion
Community Champion

@cdavisUser 

 

Assuming that your data is similar to below. 

 

Store Email
Store1 john@abc.com;tom@abc.com
Store2 mat@abc.com
Store3 neel@abc.com
Store4 richard@abc.com;jack@abc.com

 

Then you could try below DAX in the RLS window.

 

VAR __email = USERPRINCIPALNAME()
VAR __condition =
    IF ( CONTAINSSTRING ( 'Table'[Email], __email ), TRUE (), FALSE () )
RETURN
    __condition

 

 
 

 


Regards,
Nandu Krishna

lbendlin
Super User
Super User

Your single table is the right approach. But it doesn't mean each of your users has to appear only once in it. 😀

amitchandak
Super User
Super User

@cdavisUser ,

Not very clear on the need. See RLS groups can help

https://www.youtube.com/watch?v=oxYQ2GGefrs

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.