0
0
Power BIbi_tool~8 mins

RLS with multiple roles in Power BI - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - RLS with multiple roles
Dashboard Goal

This dashboard shows sales data filtered by user roles using Row-Level Security (RLS). It answers: "How do sales differ when users have different roles like Region Manager or Product Manager?"

Sample Data
OrderIDRegionProductSalesAmountSalesDate
1001EastBike12002024-01-15
1002WestHelmet3002024-01-20
1003EastHelmet4502024-02-10
1004NorthBike7002024-02-15
1005WestGloves1502024-03-05
1006SouthBike9002024-03-10
1007EastGloves2002024-03-15
Dashboard Components
  • KPI Card: Total Sales
    Formula: Total Sales = SUM(Sales[SalesAmount])
    Shows total sales amount visible to the user based on their role.
  • Bar Chart: Sales by Region
    Shows sales amount per region filtered by RLS.
    X-axis: Region
    Y-axis: Total Sales
  • Bar Chart: Sales by Product
    Shows sales amount per product filtered by RLS.
    X-axis: Product
    Y-axis: Total Sales
  • Table: Detailed Sales
    Shows OrderID, Region, Product, SalesAmount, SalesDate filtered by RLS.

RLS Roles Setup

Two roles defined in Power BI Desktop:

  • Region Manager Role: Filter Sales[Region] to allowed regions (e.g., East, West)
  • Product Manager Role: Filter Sales[Product] to allowed products (e.g., Bike, Helmet)

Users can belong to one or both roles. The effective filter is the intersection of all roles assigned.

Dashboard Layout
+----------------------+----------------------+
|      Total Sales      |   Sales by Region    |
|       (KPI Card)      |     (Bar Chart)      |
+----------------------+----------------------+
|    Sales by Product   |    Detailed Sales    |
|      (Bar Chart)      |       (Table)        |
+----------------------+----------------------+
Interactivity

Filters and slicers are controlled by RLS roles, so users only see data allowed by their roles.

  • When a user logs in, Power BI applies RLS filters automatically.
  • The Total Sales KPI, charts, and table update to show only allowed data.
  • No manual slicers needed for region or product filtering because RLS handles it.
Self Check

If a user belongs to the Region Manager Role for East and the Product Manager Role for Bike, which sales records will they see?

  • Only sales where Region = 'East' AND Product = 'Bike'.
  • From the sample data, that is OrderID 1001 with SalesAmount 1200.
  • All dashboard components will update to show this filtered data.
Key Result
Sales dashboard demonstrating Row-Level Security filtering by multiple roles (Region Manager and Product Manager) showing filtered total sales, sales by region, sales by product, and detailed sales data.