This reference lists 4 DAX relationship functions, with frequently used functions marked 🔥. Each function includes syntax, an example and parameter notes.
| Function | Description | Syntax | Example |
|---|---|---|---|
RELATED 🔥 |
Returns a related value from another table | RELATED(<column>) |
RELATED(Products[ProductName]) |
RELATEDTABLE 🔥 |
Returns the filtered related table | RELATEDTABLE(<tableName>) |
RELATEDTABLE(Sales) |
USERELATIONSHIP 🔥 |
Specifies the relationship to use in the calculation | USERELATIONSHIP(<column1>, <column2>) |
CALCULATE(SUM(Sales[Amount]), USERELATIONSHIP(Sales[ShipDate], Dates[Date])) |
CROSSFILTER |
Specifies the cross-filter direction to use | CROSSFILTER(<column1>, <column2>, <direction>) |
CROSSFILTER(Sales[ProductID], Products[ProductID], NONE) |
Detailed parameters for frequently used functions
RELATED
Returns a related value from another table.
| Parameter | Description |
|---|---|
column |
The column whose value is returned from the related table. It must have a relationship with the current table. |
RELATEDTABLE
Returns the filtered related table.
| Parameter | Description |
|---|---|
tableName |
The name of the related table. |
USERELATIONSHIP
Specifies the relationship to use in the calculation.
| Parameter | Description |
|---|---|
column1 |
The first column in the relationship. |
column2 |
The second column in the relationship. |
From Online Toolbox (www.vba.net)