Forum Discussion

Som_17's avatar
Som_17
New Member
1 year ago
Solved

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?

  • Hi Som_17 

    You can create roles on the Modelling tab:

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

     

    Now filter the Network table based on the user table:

     

    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:

     

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

1 Reply

  • Hi Som_17 

    You can create roles on the Modelling tab:

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

     

    Now filter the Network table based on the user table:

     

    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:

     

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