Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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:
| Store | |
| A | A1 |
| B | B1 |
| C | A1 |
| D | C1 |
| E | D1 |
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.
Solved! Go to Solution.
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.
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.
Perfect! That has resolved the issue.
I didn't have the Many-To-Many relationship as you mentioned
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |