RELATED DAX Function (Relationships management)
Returns a related value from another table.
Syntax
Parameter | Attributes | Description |
---|---|---|
ColumnName |
The column that contains the desired value. |
Return values
A single value that is related to the current row.
Remarks
The RELATED function requires that a 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 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.
Related articles
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
Related functions
Other related functions are:
Last update: Jan 23, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/related-function-dax