Dashboard Mode - Why data modeling connects related tables
Business Question
How can connecting related tables help us analyze sales data by product and region?
How can connecting related tables help us analyze sales data by product and region?
| SaleID | ProductID | RegionID | Quantity | SaleAmount |
|---|---|---|---|---|
| 1 | 101 | 1 | 5 | 500 |
| 2 | 102 | 2 | 3 | 300 |
| 3 | 101 | 2 | 2 | 200 |
| 4 | 103 | 1 | 4 | 400 |
| 5 | 102 | 3 | 1 | 100 |
| ProductID | ProductName |
|---|---|
| 101 | Widget |
| 102 | Gadget |
| 103 | Doohickey |
| RegionID | RegionName |
|---|---|
| 1 | North |
| 2 | South |
| 3 | East |
Formula: Total Sales = SUM(Sales[SaleAmount])
Result: 1500
Uses relationships to show product names and region names with sales.
Columns: ProductName, RegionName, Total Quantity, Total Sales
Measures:
Total Quantity = SUM(Sales[Quantity])Total Sales = SUM(Sales[SaleAmount])Sample rows:
| ProductName | RegionName | Total Quantity | Total Sales |
|---|---|---|---|
| Widget | North | 5 | 500 |
| Widget | South | 2 | 200 |
| Gadget | South | 3 | 300 |
| Gadget | East | 1 | 100 |
| Doohickey | North | 4 | 400 |
Shows total sales per region using the relationship to Region table.
Measure: Total Sales = SUM(Sales[SaleAmount])
Values:
+----------------------+----------------------+ | KPI: Total Sales | Bar Chart: Sales by | | | Region | +----------------------+----------------------+ | Table: Sales by Product and Region | | | +--------------------------------------------------+
Filters on ProductName or RegionName update the table and bar chart automatically because the tables are connected by relationships.
For example, selecting 'Widget' in a slicer filters the table and bar chart to show only sales for Widget.
If you add a filter for RegionName = 'North', which components update?