nerdexam
Microsoft

70-778 · Question #39

You have a Power BI model that contains the following tables: Sales (Sales_ID, DateID, sales_amount) Date (DateID, Date, Month, week, Year) The tables have a relationship. Date is marked as a date…

The correct answer is B. CALCULATE(SUM(sales[sales_amount]), SAMEPERIODLASTYEAR (`Date' [Date])). https://msdn.microsoft.com/en-us/library/ee634825.aspx https://docs.microsoft.com/en-us/power-bi/desktop-quickstart-learn-dax-basics https://msdn.microsoft.com/en-us/library/ee634972.aspx

Model and Visualize Data by Using Power BI Desktop

Question

You have a Power BI model that contains the following tables: Sales (Sales_ID, DateID, sales_amount) Date (DateID, Date, Month, week, Year) The tables have a relationship. Date is marked as a date table in the Power BI model. You need to create a measure to calculate the sales for the last 12 months. Which DAX formula should you use?

Options

  • ACALCULATEx(SUM(sales[sales_amount]) DATESYTD (`Date' [Date]))
  • BCALCULATE(SUM(sales[sales_amount]), SAMEPERIODLASTYEAR (`Date' [Date]))
  • CSUM(sales[sales_amount])-CALCULATE(SUM(sales[sales_amount]), SAMEPERIODLASTYEAR
  • DSUM(sales[sales_amount])-CALCULATE(SUM(sales[sales_amount]),DATESYTD(`Date'[Date]))

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    74% (25)
  • C
    18% (6)
  • D
    3% (1)

Explanation

https://msdn.microsoft.com/en-us/library/ee634825.aspx https://docs.microsoft.com/en-us/power-bi/desktop-quickstart-learn-dax-basics https://msdn.microsoft.com/en-us/library/ee634972.aspx

Topics

#DAX time intelligence#SAMEPERIODLASTYEAR#last 12 months#CALCULATE

Community Discussion

No community discussion yet for this question.

Full 70-778 Practice