
Explanation:
First blank: CALCULATE
Second blank: _LYSales
Step 1 - Defining the variable
We want to calculate sales for the same period in the prior year. The correct function here is CALCULATE , because it allows applying a filter context modification (with SAMEPERIODLASTYEAR ).
So:
VAR _LYSales =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( ' Orders ' [Order Date] ) ) Step 2 - Returning the value We then need to RETURN the value of the variable. From the dropdown options, we select _LYSales .
So:
EVALUATE
VAR _LYSales =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( ' Orders ' [Order Date] ) ) RETURN ROW ( " LastYearSales " , _LYSales ) Note: In XMLA DAX queries, you usually need a table expression, so wrapping with ROW or SELECTCOLUMNS is common, but based on the provided answer box, just returning _LYSales is sufficient here.
First blank: CALCULATE
Second blank: _LYSales