Cheat Sheets/Power BI/RELATEDTABLE
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

Related DAX functions

From Relationships

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet