Designing Dynamic Security Models
Dynamic security models in Power BI filter tables are based on the relationship of the logged-in user to a column or columns stored in the data model. The USERPRINCIPALNAME
DAX function returns the user's UPN, as per the first recipe of this chapter, and a filter expression of a security role accepts this value as a parameter. Like all filters in Power BI data models, the filters applied in security roles also filter other tables via one-to-many and bidirectional relationships. Security roles can also blend dynamic, user-based filters with standard security filters to further restrict the visibility of members mapped to these roles.
This recipe implements dynamic security on an Employees dimension table. The result is that logged-in users (employees) can only view their own data and the data of those who report to them directly or indirectly via other managers.
Getting ready
To prepare for this recipe, follow these steps:
-
...