DEFINE DAX Statement
The DEFINE keyword is part of the EVALUATE syntax.
One DEFINE can be applied to one or more EVALUATE statements.
The DEFINE keyword can include definitions of query variables (VAR), query measures (MEASURE), query columns (COLUMN), and query tables (TABLE).
The following example shows a query using a query variable in two EVALUATE statements.
DEFINE VAR LastSalesDate = MAX ( Sales[Order Date] ) EVALUATE CALCULATETABLE ( SUMMARIZECOLUMNS ( 'Product'[Product Name], "Balance", CALCULATE ( [Amount], 'Date'[Date] = LastSalesDate ) ) ) EVALUATE CALCULATETABLE ( SUMMARIZECOLUMNS ( Store[Store Name], "Balance", CALCULATE ( [Amount], 'Date'[Date] = LastSalesDate ) ) )
Last update: Aug 7, 2022 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Daniil Maslyuk
Microsoft documentation: https://docs.microsoft.com/en-us/dax/define-statement-dax