DAX function
RELATEDTABLE — DAX function reference
Get related rows (one-to-many).
Syntax
dax
RELATEDTABLE(<table>)
Examples
dax
COUNTROWS(RELATEDTABLE(Sales))
→ A table / count
dax
SUMX(RELATEDTABLE(Sales), Sales[Amount])
→ Total sales for the current row's product, in a calculated column on Product
dax
IF(COUNTROWS(RELATEDTABLE(Sales)) = 0, "Never sold", "Sold at least once")
→ Flags products with zero related transactions
Common mistakes & gotchas
- RELATEDTABLE is the reverse of RELATED: it goes from the one side to the many side, returning matching related rows as a table — it's really CALCULATETABLE(Table) using the current row context as an implicit filter, so it also follows context-transition rules.
- Like RELATED, it needs row context to know which 'current row' to filter by, so it belongs in calculated columns or as the table argument to an iterator, not directly in a plain measure.
Related DAX functions
From Relationships