Viewing as roles in Power BI Desktop
In Power BI Desktop, you can check what the users with specific roles will see even before you publish your report to the Power BI service and assign users to roles. For this, once you have at least one role defined, select View as on the Modeling ribbon in the Report view. You’ll then see the View as roles window shown in Figure 2-10.
FIGURE 2-10 View as roles
Note that you can view as several roles simultaneously. This is because you can allocate a single user or a security group to multiple roles in the Power BI service; in this case, the security rules of the roles will complement each other. For example, if you select both the Plains and the Southeast roles, you’ll see data for both territories. For this reason, you should always have clear names for your RLS roles.
Exam Tip
You should know the effect of combining multiple security roles for a single user based on the description of security filters of each role.
When viewing data as roles, you’ll see the bar at the top shown in Figure 2-11.
FIGURE 2-11 Now viewing report as
Important Application of Row-Level Security
The filters applied by row-level security are applied only at query time and not at processing time. The implication of this is that the filters won’t change the values of calculated columns and calculated tables.
Another option in the View as roles window is Other user. With this option, you can test dynamic row-level security, which is covered next.