Returns a related value from another table.
The column that contains the desired value.
A single value that is related to the current row.
The RELATED function requires that a regular relationship exists between the current table and the table with related information. The argument specifies a column reference, and the function follows a chain of one or more many-to-one relationships to fetch the value from the specified column in the related table. If a relationship does not exist, RELATED raises an error. The RELATED function cannot be used to fetch a column across a limited relationship.
The RELATED function needs a row context; therefore, it can only be used in calculated column expression, where the current row context is unambiguous, or as a nested function in an expression that uses a table scanning function. A table scanning function, such as SUMX, gets the value of the current row value and then scans another table for instances of that value.
» 1 related function
-- RELATED is needed to access columns of the expanded table DEFINE MEASURE Sales[Sales Amount] = SUMX ( Sales, Sales[Quantity] * Sales[Net Price] ) MEASURE Sales[Sales at List Price] = SUMX ( Sales, Sales[Quantity] * RELATED ( 'Product'[List Price] ) ) EVALUATE SUMMARIZECOLUMNS ( 'Date'[Calendar Year], "Sales Amount", [Sales Amount], "Sales at List Price", [Sales at List Price] )
|Calendar Year||Sales Amount||Sales at List Price|
Learn more about RELATED in the following articles:
Row Context and Filter Context in DAX
Understanding the difference between row context and filter context is important in using DAX correctly. This article introduces these two concepts. » Read more
Lookup multiple values in DAX
This article describes different techniques to retrieve multiple values from a lookup table in DAX, improving code readability and performance. » Read more
Other related functions are:
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/related-function-dax