In a DAX query executed through XMLA, which function is used to return the total amount of sales from the same period last year?

Prepare for the Fabric Certification Test. Enhance your knowledge using flashcards and multiple choice questions. Each question provides hints and detailed explanations. Be well-prepared for your certification exam!

Using the CALCULATE function in DAX is the correct choice for returning the total amount of sales from the same period last year. CALCULATE allows you to modify the filter context of a calculation, enabling you to change the filters in the underlying data model by applying new ones.

To achieve the desired result of calculating last year's sales, you would typically pair the CALCULATE function with a time intelligence function such as SAMEPERIODLASTYEAR. This effectively adjusts the date context for the calculation, allowing you to compare current sales with those from the same period in the previous year.

While SUM is essential for aggregating values, on its own, it does not modify any filter context, which is necessary in this scenario. Similarly, FILTER is used to create a table that meets certain criteria but does not inherently perform aggregation. SUMMARIZE, on the other hand, is used for grouping and summarizing data, but it does not provide the necessary time context adjustment needed to evaluate the sales from prior periods. Thus, CALCULATE is the key function for manipulating filters to retrieve the correct total for the prior year's sales period.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy