0
0
Power BIbi_tool~10 mins

Star schema concept in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sample data showing a star schema with a fact table (Orders) and two dimension tables (Customers and Products).

CellValue
A1OrderID
B1CustomerID
C1ProductID
D1OrderDate
E1Quantity
F1SalesAmount
A21001
B2C01
C2P01
D22024-01-10
E22
F240
A31002
B3C02
C3P02
D32024-01-11
E31
F325
A41003
B4C01
C4P03
D42024-01-12
E43
F475
H1CustomerID
I1CustomerName
J1Region
H2C01
I2Alice
J2North
H3C02
I3Bob
J3South
L1ProductID
M1ProductName
N1Category
L2P01
M2Pen
N2Stationery
L3P02
M3Notebook
N3Stationery
L4P03
M4Chair
N4Furniture
O1Price
O220
O325
O425
Formula Trace
SUMX(Orders, Orders[Quantity] * RELATED(Products[Price]))
Step 1: Evaluate RELATED(Products[Price]) for each row in Orders
Step 2: Calculate Quantity * Price for each row
Step 3: SUMX sums all calculated values
Cell Reference Map
Orders Table:       Products Table:
+-------+---------+   +---------+-------+
|OrderID|ProductID|   |ProductID| Price |
|  1001 |  P01    |   |   P01   |  20   |
|  1002 |  P02    |   |   P02   |  25   |
|  1003 |  P03    |   |   P03   |  25   |
+-------+---------+   +---------+-------+
   |          \___________/
   |                     
   +--------------------->
Orders table references Products table by ProductID to get Price for calculation.
Result
+-----------------+
| Total Sales = 140|
+-----------------+
The total sales amount calculated by multiplying quantity by product price and summing all orders.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the RELATED function do in the formula?
ASums all quantities in Orders
BFetches matching product price from Products table
CFilters Orders by ProductID
DCalculates total sales directly
Key Result
SUMX iterates over fact table rows, multiplying measure by related dimension value, then sums results.