Treatise on TREATAS() Alex Whiteside 08/15/19
Data Lineage DAX preserves the relationships of references to columns and their values* in the data model Renaming a column does not disrupt data lineage
Data Lineage DAX preserves the relationships of references to columns and their values in the data model …*but not expressions
TREATAS() TREATAS() Introduced in PBI Desktop February 2017 TREATAS(table_expression, <column>[, <column>[, <column>[,…]]]} ) Applies the result of a table expression as filters to columns from an unrelated table. “treat X as a filter for Y”
Performance Ranking TREATAS() is less efficient than using a physical relationship to propagate a filter (including leveraging an inactive relationship with USERELATIONSHIP()) , but more efficient than creating a virtual relationship with other functions source: sqlbi “Propagating filters using TREATAS in DAX”
Common Scenarios Surrogate for relationships that cannot be created due to… filtering ambiguity C.f. leveraging an inactive relationship with USERELATIONSHIP() constraints on changing the data model (e.g. using Live Connection)
Common Scenarios Filtering tables of differing granularities e.g. budget/forecast vs actuals
Common Scenarios Filtering a table with a table expression