RELATEDTABLE DAX Function (Relationships management) Context Transition
Returns the related tables filtered so that it only includes the related rows.
The table that contains the desired value.
A table of values.
The RELATEDTABLE function performs a context transition from row context(s) to a filter context, and evaluates the expression in the resulting filter context.
This function is a shortcut for CALCULATETABLE function with no additional filters, accepting only a table reference and not a table expression.
» 1 related function
-- RELATEDTABLE is an alias - albeit limited - of CALCULATETABLE DEFINE MEASURE Sales[Sales Amount] = SUMX ( Sales, Sales[Quantity] * Sales[Net Price] ) MEASURE Sales[TX/Customer w/rel] = AVERAGEX ( Customer, COUNTROWS ( RELATEDTABLE ( Sales ) ) ) MEASURE Sales[TX/Customer w/calc] = AVERAGEX ( Customer, COUNTROWS ( CALCULATETABLE ( Sales ) ) ) EVALUATE SUMMARIZECOLUMNS ( 'Date'[Calendar Year], "Sales Amount", [Sales Amount], "TX/Customer w/rel", [TX/Customer w/rel], "TX/Customer w/calc", [TX/Customer w/calc] )
|Calendar Year||Sales Amount||TX/Customer w/rel||TX/Customer w/calc|
Learn more about RELATEDTABLE 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
Understanding Context Transition
The context transition in DAX is the transformation of row contexts into an equivalent filter context performed by CALCULATE and CALCULATETABLE. Managing this behavior is the next step in learning DAX once you understand row context and filter context. This article provides the basics of context transition. » Read more
Other related functions are:
Last update: Mar 6, 2023 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Pär Adeen
Microsoft documentation: https://docs.microsoft.com/en-us/dax/relatedtable-function-dax