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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
alexanderandro
Regular Visitor

Advance DAX on RLS

Hello,

 

I just started learning Power BI and I bumped into this problem regarding Row Level Security using advance DAX. I have this Table filter DAX expression [Email] = UserprincipalName but it turned out that all of the data in the column I am referring to had a fix suffix (e.g. @mydomain.com) but some of the user audience I want to share the report to authenticates with only @domain.com suffix. I tried creating another column [AlternateEmail] and used SUBSTITUTE function to replace @mydomain.com to @domain.com and set the Table filter DAX expression to [Email] = UserprincipalName() || [AlternateEmail] = UserPrincipalName() but did not work. Can you do advance DAX on the Table filter DAX expression using userprincipalname() function that accepts both?

 

Thank you in advance

3 REPLIES 3
alexanderandro
Regular Visitor

Hi Icey,

 

Thank you for your response. I appreciate the video and I have done this. It turned out that the audience I want to share it to has multiple domains as there were a lot of branches globally not only @domain.com and @mydomain.com. I am guessing we acquired a bad mapping data, so my approach is a sort of like dynamic filtering on the columns we are using. Is it possible to apply this on the table filter DAX expression? 

 

alexanderandro_0-1607502057085.png

 

 

 

Hi @alexanderandro ,

 

Sorry, I'm confused. Isn’t the result returned by your formula always "TRUE"?


 

alexanderandro_0-1607502057085.png

 


 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Icey
Community Support
Community Support

Hi @alexanderandro ,

 


I have this Table filter DAX expression [Email] = UserprincipalName but it turned out that all of the data in the column

 


How did you test it? Did you both select "Others" and your new role like below?

rls.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors