0
0
Power BIbi_tool~8 mins

Relationship direction and cross-filtering in Power BI - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Relationship direction and cross-filtering
Business Question

How does changing the relationship direction and cross-filtering between Sales and Products tables affect the total sales and product details shown in the dashboard?

Sample Data
SalesIDProductIDQuantitySalesAmount
11012200
21021150
31033450
41011100
51045500

ProductIDProductNameCategory
101NotebookStationery
102PenStationery
103ChairFurniture
104DeskFurniture
105LampFurniture
Dashboard Components
  • KPI Card: Total Sales Amount
    Formula: Total Sales = SUM(Sales[SalesAmount])
    Result: 1400
  • Table Visual: Product Sales Details
    Columns: ProductName, Category, Total Quantity Sold, Total Sales Amount
    Measures:
    Total Quantity Sold = CALCULATE(SUM(Sales[Quantity]))
    Total Sales Amount = CALCULATE(SUM(Sales[SalesAmount]))
    Shows sales grouped by product
  • Slicer: Category Filter
    Based on Products[Category]

Relationship Setup: Single direction from Products to Sales on ProductID by default.

Cross-filtering: Changing relationship direction to both directions allows filtering from Sales to Products and vice versa.

Dashboard Layout
+----------------------+--------------------------+
|      KPI Card        |      Category Slicer      |
|  Total Sales Amount  |                          |
+----------------------+--------------------------+
|          Product Sales Details Table             |
|                                                  |
+--------------------------------------------------+
Interactivity

The Category Slicer filters the Product Sales Details Table by product category. Because the relationship is single direction from Products to Sales, filtering by category affects sales data shown in the table.

If the relationship direction is changed to both directions, selecting a product or sales amount in the table can filter the slicer and other visuals, enabling two-way filtering.

Self Check

Task: Add a filter selecting the category Furniture in the Category Slicer.

Question: Which products and sales amounts appear in the Product Sales Details Table, and what is the updated Total Sales Amount in the KPI Card?

Answer: The table shows only products in Furniture category: Chair, Desk, and Lamp. Sales amounts for these products are 450 (Chair) + 500 (Desk) = 950. The KPI Card updates to show Total Sales Amount = 950.

Key Result
Dashboard shows total sales and product sales details with filtering affected by relationship direction between Products and Sales tables.