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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Som_17
New Member

Managing Roles

Hello!

 

I have 3 tables:

1. Employees: where I have the email address, employee code, agency code, function

2. Network: where I have agency code, area code, region code

3. Table with Kpi for employees

 

I want when someone logs into power service, to see the table with kpi only for his region, if he is a regional manager, only for the area if he is a area manager, or only for his agency if he is an agency manager.

 

Could you please help me?

1 ACCEPTED SOLUTION
SamWiseOwl
Community Champion
Community Champion

Hi @Som_17 

You can create roles on the Modelling tab:

SamWiseOwl_0-1728559725486.png

Add a new role and select the table to filter (Network) and click Switch to DAX view

SamWiseOwl_1-1728559784810.png

 

Now filter the Network table based on the user table:

SamWiseOwl_2-1728559962453.png

 

Network[Agency Code] = CALCULATE(Employees[Agency Code], Employees[email address] = USERPRINCIPALNAME())
 
To test it out choose Modelling | View as role and then tick the role and enter the email address to test:
SamWiseOwl_3-1728560026754.png

 

Now your report (and table view) will be filtered by your calculation.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

1 REPLY 1
SamWiseOwl
Community Champion
Community Champion

Hi @Som_17 

You can create roles on the Modelling tab:

SamWiseOwl_0-1728559725486.png

Add a new role and select the table to filter (Network) and click Switch to DAX view

SamWiseOwl_1-1728559784810.png

 

Now filter the Network table based on the user table:

SamWiseOwl_2-1728559962453.png

 

Network[Agency Code] = CALCULATE(Employees[Agency Code], Employees[email address] = USERPRINCIPALNAME())
 
To test it out choose Modelling | View as role and then tick the role and enter the email address to test:
SamWiseOwl_3-1728560026754.png

 

Now your report (and table view) will be filtered by your calculation.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.