TechNet
Export (0) Print
Expand All

RELATEDTABLE Function (DAX)

 

Evaluates a table expression in a context modified by the given filters.

Syntax

RELATEDTABLE(<tableName>)

Parameters

TermDefinition
tableNameThe name of an existing table using standard DAX syntax. It cannot be an expression.

Return Value

A table of values.

Remarks

The RELATEDTETABLE function changes the context in which the data is filtered, and evaluates the expression in the new context that you specify.

This function is a shortcut for CALCULATETABLE function with no logical expression.

Example

The following example uses the RELATEDTABLE function to create a calculated column with the Internet Sales in the Product Category table.

The following table shows the results of using the code shown here.

Product Category KeyProduct Category AlternateKeyProduct Category NameInternet Sales
11Bikes$28,318,144.65
22Components
33Clothing$339,772.61
44Accessories$700,759.96
= SUMX( RELATEDTABLE('InternetSales_USD')
     , [SalesAmount_USD])

See Also

CALCULATETABLE Function (DAX)
Filter Functions (DAX)

Community Additions

Show:
© 2016 Microsoft