You need to write a DAX query that will be executed by using the XMLA endpoint. The query must return the total amount of sales from the same period last year.
How should you complete the DAX expression? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Show answerHide answer
Explanation

Explanation:
The task requires writing a DAX query executable via the XMLA endpoint to return only the total sales from the same period last year (LY Sales). EVALUATE must start a query, and the result should contain a single calculated column or measure representing last year's sales. SAMEPERIODLASTYEAR shifts the current date context back by one year, making it suitable for time intelligence calculations in retail sales analysis.
Correct Option:
SUMMARIZE
SUMMARIZE, when used with a single measure expression, creates a one-row table containing that calculated value—ideal for returning a simple scalar result like total LY sales without needing extra columns or groupings.
LYSales
This is the appropriate calculated column name for the result, clearly indicating "Last Year Sales" and matching common naming conventions in the query output.
[Total Sales] (in the RETURN section)
Selecting [Total Sales] ensures the query returns the existing measure value, but wrapped in the time intelligence context provided by SAMEPERIODLASTYEAR on 'Orders'[Order Date].
SAMEPERIODLASTYEAR ( 'Orders'[Order Date] )
This time intelligence function correctly shifts the current filter context on the date column back exactly one year, enabling accurate calculation of sales for the equivalent prior period.
Incorrect Option:
CALCULATE
CALCULATE modifies a measure but does not create a table result by itself; using it directly after EVALUATE would cause a syntax error in a tabular query.
CALCULATETABLE
CALCULATETABLE returns a filtered table, not a single aggregated value; it would require additional aggregation and is unnecessary here.
FILTER
FILTER is used for row context iteration or filtering tables but cannot standalone produce the required summarized scalar output.
SUMMARIZECOLUMNS
SUMMARIZECOLUMNS is optimized for column projections and groupings but adds overhead when no grouping columns are needed; SUMMARIZE is simpler and sufficient for a single measure.
{ LYSales } / VAR
These are invalid in the RETURN section; curly braces denote table constructors incorrectly here, and VAR is for variable declaration, not table return.
[Total Sales] (as the only option without time shift)
Without wrapping in SAMEPERIODLASTYEAR, this would return current period sales, not last year's.





