DAX Filter - RELATED function


Advertisements

Description

Returns a related value from another table.

Syntax

RELATED (<column>) 

Parameters

Sr.No. Parameter & Description
1

column

The column that contains the values you want to retrieve.

Return Value

A single value that is related to the current row.

Remarks

DAX RELATED function requires that a relationship exists between the current table and the table with related information. When you specify the column that contains the data that you want, the function follows an existing relationship to fetch the value from the specified column in the related table.

When DAX RELATED function performs a lookup, it examines all values in the specified table regardless of any filters that may have been applied.

DAX RELATED function needs a row context. Hence, it can be used only in one of the following cases −

  • A calculated column expression, where the current row context is unambiguous.
  • As a nested function in an expression that uses a DAX X function, such as SUMX.

Example

= SUMX (FILTER (Sales, RELATED (Products[Product]) <>"Soap"), Sales[Sales Amount]) 
dax_functions_filter.htm
Advertisements