TREATAS Function in DAX
The TREATAS function in DAX is used when we need to filter a table based on values from another table, especially when there’s no direct relationship between them.
What is TREATAS?
TREATAS treats the values in one column (or multiple columns) as if they belong to another column in a different table. It essentially applies filter context from one table onto another table’s columns—even if there's no relationship between the tables.
DAX Syntax
The function has the following parameters:
- table_expression: An expression that results in a table.
- column: One or more existing columns. It cannot be an expression.
The number of columns specified must match the number of columns in the table expression and be in the same order.
Example: Let’s we have the following table named “Countries”.

Let’s we have another table named “Company Sales”.

In the model view we can see there is no relationship between these tables.

Let’s create a measure with name “TREATAS Measure”.
DAX
TREATAS Measure = CALCULATE( SUM(Countries[Population (Millions)]), TREATAS( VALUES('Company Sales'[Year]), Countries[Year] ) )
This will filter the Countries table as if the selected year in “Company Sales” are coming directly from Countries.

The image demonstrates the use of the TREATAS function in Power BI to filter data across unrelated tables. A slicer filters the Company Sales[Year] column (showing 2022), and the “TREATAS Measure” uses this selection to filter the Countries table by mimicking a relationship. As a result, the TREATAS Measure displays the 2022 population total (3,500.20 million), matching the population for that year in the Countries table. The breakdown by country also shows only the values for 2022, confirming that TREATAS successfully applies the year filter without a direct relationship in the data model.
Key Notes:
- TREATAS only works inside filter context (e.g., inside CALCULATE, CALCULATETABLE).
- It doesn’t create a relationship—just mimics one during calculation.
- It’s not visible in the data model view, so document your usage clearly.