Which DAX formula should you use?

You have a Power BI model that contains the following two tables:
• Sales (Sales_ID, DatelD, sales_amount)
• Date(DatelD, Date, Month, Week, Year)
The tables have a relationship.
You need to create a measure to calculate the sales for same period from the previous year.
Which DAX formula should you use?
A. SUM(sales[sales_amount]) – CALCULATE(SUM(sales[sales_amount]), DATESYID(‘Date'[Date]))
B. CALCULATE(SUM(sales[sales_amount]), SAMEPERIODLASTYEAR(‘Date'[Date]))
C. SUM(sales[sales_amount]) – CALCULATE(SUM(sales[sales_amount]), SAMEPERIODLASTYEAR(‘Date'[Date]))
D. CALCULATEx(SUM(sales(sales_amount]), DATESYID(‘Date'[Date]))

microsoft-exams

3 thoughts on “Which DAX formula should you use?

  1. Isn’t in question they are asking to provide sales of previous year for same period for example-> Dec 01 2018 sales w.r.t Dec 01 2019 sales. They doesn’t seem to be asking difference/ raise of sales in this period.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.