Looking Up with RELATED
Part of the Power BI Basics section of Coddy's Power BI journey. Lesson 24 of 28.
A Sales column cannot read Products[UnitCost] directly: which product?
RELATED follows the relationship to the matching row and brings back its value.
Cost = Sales[Quantity] * RELATED(Products[UnitCost])It works from Sales towards a lookup table, which has one row per key.
Challenge
Add a column Cost to Sales: the quantity times the unit cost of the product, looked up in Products.
All lessons in Power BI Basics
1Meet Power BI
What Power BI IsTables, Rows and ColumnsYour First ChartSum, Count and AverageFilters and SlicersRecap - Mia's First Report4Calculated Columns
Columns vs MeasuresIF in a ColumnText ColumnsLooking Up with RELATEDColumns Feed MeasuresProfit and MarginWhen to Use WhichRecap - Profit by Category