exam questions

Exam 70-778 All Questions

View all questions & answers for the 70-778 exam

Exam 70-778 topic 1 question 118 discussion

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

DRAG DROP -
You need to create a measure named YTDPreviousSales that will be used in a table visualization. YTDPreviousSales must show the year-to-date (YTD) sales of the previous year for the same month. A sample of the desired data is shown in the following table.

How should you complete the measure? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
References:
https://powerpivotpro.com/2016/01/year-to-date-in-previousprior-year/

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, 9 months ago
Should be TOTALYTD and DATEADD
upvoted 34 times
Israel2
4 years, 11 months ago
Example The following sample formula creates a measure that calculates the 'year running total' or 'year running sum' for Internet sales. =TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey])
upvoted 1 times
...
...
exam_taker5
Highly Voted 5 years, 9 months ago
No, I think Calculate is correct. The DateAdd filters the summation by the correct month for the previous year.
upvoted 11 times
SteveKarr
5 years, 9 months ago
Even I think it should be TOTALYTD and DATEADD. Only problem with these two would be that this measure will have no value for the first year in the table. Suggested solution, will give the value 12 months ago only. It will not cumulate to calculate YTD values.
upvoted 3 times
...
gerrard
5 years, 6 months ago
Agree, based on this article https://powerpivotpro.com/2016/01/year-to-date-in-previousprior-year/
upvoted 1 times
gerrard
5 years, 6 months ago
Actually, I agree with Steve. The sollution is missing a function DATESYTD
upvoted 3 times
...
...
saw
5 years, 2 months ago
CALCULATE is the right answer as we want the sum for each month (not YTD)
upvoted 2 times
saw
5 years, 2 months ago
Sorry it's the opposite. We want the cumulative sum sot it should be TOTALYTD
upvoted 1 times
...
...
...
nemanjaandic
Most Recent 4 years, 1 month ago
TotalYTD and DateAdd is correct answer. This way we get YTD values for last year. If we use Calculate and DateAdd we get values for specific date for last year, but not YTD.
upvoted 1 times
...
zwwdplay
4 years, 3 months ago
TOTALYTD returns a scalar value rather than a table that contains a column of the dates for the year to date, in the current context.
upvoted 1 times
...
Lhouss
4 years, 4 months ago
TOTALYTD and DATEADD for sure.
upvoted 1 times
...
CDL
4 years, 5 months ago
TotalYTD & DateAdd https://www.youtube.com/watch?v=t4kd-QY6Rh0 1min 07 sec: TotalYTD 2min 19 sec: Same period last year -> Calculate & DateAdd/SamePeriodLastYear https://docs.microsoft.com/en-us/dax/totalytd-function-dax https://docs.microsoft.com/en-us/dax/dateadd-function-dax https://radacad.com/dateadd-vs-parallelperiod-vs-sameperiodlastyear-dax-time-intelligence-question PS: SamePeriodLastYear only goes one year back, DateAdd can go two years back or even more. DateAdd is a customized version of SamePeriodLastYear.
upvoted 1 times
CDL
4 years, 5 months ago
from Ref: [Prev Yr YTD Sales] = CALCULATE([Total Sales], DATEADD(DATESYTD(Calendar[Date]),-1,Year)) From TotalYTD example: The following sample formula creates a measure that calculates the 'year running total' or 'year running sum' for Internet sales. = TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey])
upvoted 1 times
...
...
Fenloh
4 years, 9 months ago
I believe TotalYTD would be the correct measure to use, because Calculate would add up all Amounts until the Date. So if you would use Dateadd -12 Months as Filter, it would add up all previous years up to that date. If you use Totalytd, it would only add up the last year. So I agree too, that you would need to use totalytd.
upvoted 3 times
...
123
4 years, 9 months ago
I'm inclined to go with the answer given - https://radacad.com/dateadd-vs-parallelperiod-vs-sameperiodlastyear-dax-time-intelligence-question
upvoted 1 times
...
rainbowstuf
4 years, 10 months ago
given answere is correct CALCULATE(sum(Sales[Revenue]),DATEADD('Date'[Date],-12, MONTH)) or CALCULATE([Total Sales],SAMEPERIODLASTYEAR('Date'[Date])) both dax gives the same result. so, ans is correct
upvoted 3 times
Mange
4 years, 10 months ago
I disagree. It should be TOTALYTD and DATEADD. Tested and verified. I agree with AkaChilala
upvoted 2 times
...
...
AkaChilala
5 years, 5 months ago
The provided answer is wrong. It gets you the Previous Year but is missing a YTD function. Since there's no room for DATESYTD, replacing CALCULATED with TOTALYTD resolves the problem.
upvoted 3 times
Brunobsv
5 years, 4 months ago
By syntax TotalYTD is not wrong.
upvoted 1 times
JohnFan
5 years, 4 months ago
Syntax: TOTALYTD(<expression>,<dates>[,<filter>][,<year_end_date>]) For example, the following formula specifies a (fiscal) year_end_date of 6/30 in an EN-US locale workbook. =TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey], ALL(‘DateTime’), “6/30”) The following sample formula creates a measure that calculates the 'year running total' or 'year running sum' for Internet sales. =TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey]) https://docs.microsoft.com/en-us/dax/totalytd-function-dax
upvoted 2 times
JohnFan
5 years, 4 months ago
Either DATESYTD within DATEADD or TOTALYTD outside.
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago