exam questions

Exam 70-778 All Questions

View all questions & answers for the 70-778 exam

Exam 70-778 topic 1 question 27 discussion

Actual exam question from Microsoft's 70-778
Question #: 27
Topic #: 1
[All 70-778 Questions]

You have a Power BI model that contains the following two tables:
✑ Sales (Sales_ID, DateID, sales_amount)
✑ Date(DateID, 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]))
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
References:
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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
TiaanR
Highly Voted 5 years, 11 months ago
Should be B
upvoted 48 times
rhsdeal
5 years, 10 months ago
Definitely B this is also question 8 on topic 2 page 29
upvoted 6 times
123
4 years, 11 months ago
This is NOT the same as the question #8 on topic 2. THAT question asks for the totals for each month over the past year; this appears to be from this time last year.
upvoted 2 times
...
...
...
Tof
Highly Voted 5 years, 9 months ago
B also
upvoted 6 times
...
aaaaatoz
Most Recent 4 years, 5 months ago
B for sure
upvoted 1 times
...
Lhouss
4 years, 6 months ago
Should be B
upvoted 1 times
...
CDL
4 years, 7 months ago
B is correct.
upvoted 1 times
...
Amanulla
4 years, 9 months ago
Ans shold be B
upvoted 1 times
...
aj151
4 years, 9 months ago
B Okkkkkk
upvoted 1 times
...
Rahhal
4 years, 10 months ago
I Think B
upvoted 1 times
...
pbia
4 years, 11 months ago
Answer is B https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax#example
upvoted 3 times
cromastro
4 years, 9 months ago
Exactly. Identical calculation.
upvoted 1 times
...
...
NasheM
4 years, 11 months ago
The answer is definitely B
upvoted 3 times
...
Onkar26
5 years ago
Correct Answer is B
upvoted 3 times
...
Den2020
5 years, 1 month ago
Of course B...
upvoted 3 times
...
Echicken07
5 years, 3 months ago
Ok this is super confusing .... but the Answer should be B...but it's C because of the first DAX indicator [super sneaky]. so B & C are looking for exactly the same thing, however, C states that it wants the SUM of the Sales Amount in the following Syntax, with [""] operator being the key here which means [in]. Therefore, the C statement saids give me the SUM of Sales Amount calculated in the Previous Year. I don't believe the additional statement was necessary but I am guessing that is there justification about why it's not what everyone else thinks it is.
upvoted 1 times
...
iSharaf
5 years, 5 months ago
It should be B
upvoted 2 times
...
mohroshdy
5 years, 5 months ago
The correct answer is B
upvoted 1 times
...
MandyL
5 years, 6 months ago
the answer should be B. what's D is about, can't really see it
upvoted 1 times
...
JohnFan
5 years, 6 months ago
The questions is, "You need to create a measure to calculate the sales for same period from the previous year." NOT "You need to create a measure to calculate the sales for same period of the previous year."
upvoted 3 times
jashjacob
5 years, 5 months ago
Do you mean it's a 13 month total?
upvoted 1 times
...
bertw
4 years, 2 months ago
What is the difference between the two?
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...