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
VayunRangnekar
Frequent Visitor

Power BI Manage Roles - Single User Multiple Instances within the same Role

Hello All!

 

I've got a problem when setting up roles where I was trying to base it on the User's email and what store's data they can see. 

 

I've looked around and can't seem to get an answer so hoping someone can help 🙂

 

The Email table looks like this:

StoreEmail
AA1
BB1
CA1
DC1
ED1


The issue is that all measures break when I filter to the "A1" email due to multiple stores being brought back within the roles. I've tried using this:

VAR _User = USERPRINCIPALNAME ()
VAR _Stores = CALCULATE ( VALUES ( 'Email'[Store] ), FILTER ( EmailTable, 'EmailTable'[Email] = _User )
RETURN
'Stores'[Store] = _Stores

With no luck when I select an email with multiple stores within the Email Table.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

hi @VayunRangnekar ,

 

Have your tried creating a many to many relationship (role filtering store dimension) and then in the role set [Store] = USERPRINCIPALNAME()? I have the same setup in one of my clients. An account email may actually repeat several times as one can have multiple assigned territories.

danextian_0-1709124344758.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

hi @VayunRangnekar ,

 

Have your tried creating a many to many relationship (role filtering store dimension) and then in the role set [Store] = USERPRINCIPALNAME()? I have the same setup in one of my clients. An account email may actually repeat several times as one can have multiple assigned territories.

danextian_0-1709124344758.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Perfect! That has resolved the issue.

 

I didn't have the Many-To-Many relationship as you mentioned

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

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.