[DAX] TREATAS()

Syntax

TREATAS(table_expression, <column>[, <column>[, <column>[,…]]]} )

  1. See “TREATAS” as a virtual table. Therefore, you can put it in the CALCULATE conditional expression.
  2. TREATAS Example =
    CALCULATE( [Total Revenue],
    TREATAS( SUMMARIZE(

Simple TREATAS()

Assumption
We have a Budget Table by Product and by Year as below.

Budget Table by Product and by Year
Wrong Way
  • Use VALUES() to get the values in the Calendar Year column.
TREATAS Formulas
Goal — Final Results with TREATAS

TREATAS() & SUMMARIZE()

Goal
To create a table visual to show the yearly budget and by Product

  • With TREATAS, we connect the SUMMARIZE Product & Year with the Budget Table. That is, TREATAS creates a virtual relationship between the two table.
Goal — Final Results with TREATAS

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store