Using the RELATEDTABLE function
The RELATEDTABLE 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 the CALCULATETABLE function with no logical expression.
The RELATEDTABLE function leverages the relationships built in the model Diagram view. In this model, there is a one to many relationship between the Manner_of_Crash table and the CRASH_DATA_T table. The RELATEDTABLE function is applied on the many table (Manner_of_Crash) and performs a lookup on the one table (CRASH_DATA_T).
In this recipe, you will create a new column to the Manner_of_Crash table. This recipe uses the RELATEDTABLE function to count the number of rows in the CRASH_DATA_T ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access