Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Filter dashboard by user login

is it possible to filter a dashboard based on who is logged in viewing the dashboard. I have a dashboard where I would like to have it focused on the indivual viewing the data that it would be related to only them. Also another where a supervisor would log in to view only the data related to his./her employees.

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    If I use RLS(row level security) and I have a field with the username or email. The System will have user names added and will need the query to be able to filter to a specific user that is logged into the dashboard.

     

    It seems to me that RLS would required I set up a user group for each individual name and then create a filter for that name. 

     

    I am looking for a filter that would not require setting up a filter for each user (unless I am not understanding the RLS solution mentioned).

     

    And if a user is a supervisor I would like to have a dashboard filter the data to the supervisor and his related employees based on his email or username that match what is already supplied in the tables.

  • You can look into Row-Level Security but this will require a model change as it performs filter of the data based on the user's login (typically their email address).  

     

    Row-level security (RLS) with Power BI can be used to restrict data access for given users. Filters restrict data access at the row level, and you can define filters within roles. You define the roles in the desktop and associate users with the roles in the service.  Be aware that in the Power BI service, admins/members and contributors of a workspace have access to datasets in the workspace. Users with the viewer role will follow the RLS rules but for the others (admins/members and contributors) RLS doesn't restrict this data access.

     

    Here are some links you can reference:

     

    https://docs.microsoft.com/en-us/power-bi/service-admin-rls

     

    https://www.youtube.com/watch?v=9wN33rTaiB4

     

    Hope this helps!

    Dawn Thompson

     

    PS:  If this solution works, please mark it as a solution to help others. Kudos are nice too.

     

     

     

     

  • v-xuding-msft's avatar
    v-xuding-msft
    Community Support

    Hi Anonymous ,

    Does that make sense? If so, kindly mark the helpful answer as a solution. More people who have the same request will find the ideas easily and vote them up to get the feature fixed quickly. 

     

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.