Forum Discussion

RashmitaR's avatar
RashmitaR
Helper IV
9 years ago

Two Roles to one user and switch between roles

Hi,

 

There is a User who has two roles. The access to these roles are maintained in a table which has all the dimensions as columns. For example if a User is a Geography Head, Geo_Id column will have that particular geography's code against the user. 

In our scenario the user is both Geography Head and also Vertical Head, and Geography code and Vertical code are populated against the user in the table. When we do Row level security, the data is fetched as a combination of Geography and Vertical, but the user should be able to see the whole data related to the Geo or the whole data related to the vertical(based on the user's preference of looking at the report).

 

If the user wants to view the data as only the Geography head or the vertical head how can we achieve this?

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RashmitaR,

     

    You can use query editor to achieve your requirement.

     

    Sample:

     

     

     

     

     Then create the role level security:

     

    Result:

     

     

    Regards,

    Xiaoxin Sheng

    • RashmitaR's avatar
      RashmitaR
      Helper IV

      Anonymous I will ellaborate what my issue is 

       

      I have few table two of them are :

      User_access_table 

       

      user_table 

       

       

      These were the roles provided to me 

       

       

       So basicaly What I want is any user who logs into their power bi, their user id is obtained from the username() function and is matched with the user_table which is mapped to the user_access_table.

       

      now from the user access table if there is any value in the geo_id column that means that, that paticular person is the head of that geography and if he has some value in the vertical_id column that means he is the head of that vertical.

       

      Now i have created 3 roles geo_head,vertical head and the one who can see an intersection of both

       

      and then after going into power bi services i can allocate each user their respective roles .

      But my major concern is that this allocation to various roles is affodable only if there are lesser number of users .If there are say 500 users then manually allocating them roles in services will take huge manpower which i need  to reduce  any way how I can achieve this.