Angelica Choo Quan, a trainer at Pragmatic Works, explains how to implement bidirectional cross-filtering in Power BI reports and how it interacts with row-level security (RLS). Using Adventure Works data as an example, she provides a step-by-step guide for report builders to restrict user access to specific data.
Angelica starts by connecting to the Adventure Works dataset. The report contains multiple visuals:
For demonstration, Angelica focuses on restricting user access to certain countries using roles in Power BI Desktop, while assigning users to these roles in the Power BI Service.
She highlights the process of creating RLS roles:
After creating roles, she demonstrates how to test them using the View as Role feature. Initially, the US Role filters the sales data correctly but does not automatically restrict customer information in related tables.
Angelica explains that by default, relationships in Power BI are single-directional:
To fully enforce RLS across related tables, the relationship must be updated to bidirectional cross-filtering.
To enable bidirectional filtering:
After applying these changes, the customer table now reflects restricted access according to the defined roles. For instance, the US Role only displays customers from the United States, while the France Role displays customers from France. This ensures that RLS works across all relevant visuals and tables.
Angelica demonstrates testing roles in the report view:
By applying bidirectional cross-filtering, report builders gain greater control over RLS implementation, ensuring that sensitive data is visible only to authorized users.
Angelica concludes by encouraging viewers to check her previous video on basic row-level security for more foundational knowledge. She also invites viewers to explore Pragmatic Works’ on-demand learning platform for courses on Azure, Power BI, Power Apps, Power Automate, and more.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power BI and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.