A. Manage roles – in PowerBI desktop
- on the report, there is a “Language Course Subject Selection” Box
- need to set up roles so user can access report information only for certain language.
- under the “Modeling” tab, click “Manage roles”
- In the “Manage roles” dialog box, click “Create” button to create new roles.
- I have created 3 roles: “ESL”, “German”, and “Universal Access”.
- Tables section listed the all tables in the powerBI file. I have two tables in this file: data1 and lang_dimension1. data1 is the student level demographic fact data and lang_dimenstion1 is the language course information.
- “ESL” role will filter the results for language course description for only “English as a Second Language” courses.
- “German” role will filter the results for only German language course.
- “Universal Access” role has no filter.
- The “Table filter DAX expression” section can be used to define the filter(s)
- If the filter is applied to a particular role, the filter sign will appear next to the … (more) sign of the table .
- Click … to access more options of the roles or tables.
B. View as Roles – in PowerBI desktop
- under the “Modeling” tab, click “View as”
- check “German” and OK
- The visual will only show the results for German language courses and “Language Course Subject Selection” will only have “German” listed.
- There is also a yellow warning message appeared on the top on the visual stating “Now viewing report as: German” and click the “Stop viewing” to stop viewing the report as German role.
- after setting up the roles and viewing the roles to make sure the roles are functional, publishing the report to the PowerBI workspace.
C. App Access – in PowerBI service
- Be careful with creating and assigning roles to the report. As soon as you create a role in report, all the end users of the report need to be assign to a role. If no role is assigned, even you add the end users to the app, they will not able to view the powerbi visuals, and all the visuals become blank boxes with a message that you don’t have permission to the underlying dataset.
- In the PowerBI workspace where the PowerBI report was published, go to the “Datasets” tab and click … of the report and select “Security”
- select row-level security and add the emails of the member and save.
- update app.