exam questions

Exam PL-300 All Questions

View all questions & answers for the PL-300 exam

Exam PL-300 topic 2 question 48 discussion

Actual exam question from Microsoft's PL-300
Question #: 48
Topic #: 2
[All PL-300 Questions]

You have the Power BI data model shown in the following exhibit.



The Sales table contains records of sales by day from the last five years up until today’s date.

You plan to create a measure to return the total sales of March 2021 when March 2022 is selected.

Which DAX expression should you use?

  • A. Calculate (Sum(Sales[Sales]), PREVIOUSYEAR( dimDate[Date])
  • B. TOTALYTD (SUM(Sales[Sales]), dimDate[Date] )
  • C. Calculate (SUM(Sales[Sales]), SAMEPERIODLASTYEAR(dimDate[Date] ))
  • D. SUM(Sales[Sales])
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
Jayjay5
Highly Voted 1 year, 11 months ago
Selected Answer: C
Correct
upvoted 11 times
...
jsking
Highly Voted 2 years, 5 months ago
Selected Answer: C
Yup! answer is correct!
upvoted 6 times
...
seffy
Most Recent 5 months, 2 weeks ago
Selected Answer: C
According to the answers we chose SAMEPERIODLASTYEAR() is more precise
upvoted 1 times
...
jaume
7 months, 1 week ago
Selected Answer: C
My vote is also for Option C using SAMEPERIODLASTYEAR() function
upvoted 1 times
...
LL_Seva
1 year, 4 months ago
Copy-pasted from MS forum: Previousyear: This function returns all dates from the previous year given the latest date in the input parameter. For example, if the latest date in the dates argument refers to the year 2009, then this function returns all dates for the year of 2008, up to the specified year_end_date. SAMEPERIODLASTYEAR: Returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context.
upvoted 5 times
...
Koalakueh
1 year, 7 months ago
A is wrong because of wrong syntax. The close bracket at the end is missing
upvoted 4 times
...
VGG2001
1 year, 11 months ago
I tested it in the Power Bi. A and C both give the same result so I think A and C are both correct.
upvoted 2 times
Emarus
1 year, 11 months ago
A is not correct. PREVIOUSYEAR will generate the date from the whole previous year, which means that if your current context is only about 3 months, you're getting a 12 months (from previous year) context, and comparing 3 months with 12 months is nonsense
upvoted 8 times
...
Ibritics
1 year, 9 months ago
PREVIOUSYEAR calculates the cumulative till the year
upvoted 2 times
...
...
Aravind_DAS
2 years ago
Why not A?
upvoted 4 times
ZSun
1 year, 11 months ago
"PREVIOUSYEAR: Returns a table that contains a column of all dates from the previous year, given the last date in the dates column, in the current context." This means, if my date data ranges from 2007/08/05 -2007/09/05. The last date in this column is 2007/09/05. The returned column would be 365 date from 2006/01/01 to 2006/12/31. for SAMEPERIODLASTYEAR, the result would only be 2006/08/05 -2006/09/05
upvoted 14 times
...
...
user12345678
2 years, 1 month ago
Selected Answer: C
Correct answer given
upvoted 3 times
...
Shalaleh
2 years, 1 month ago
Selected Answer: C
The Given answer is correct.
upvoted 4 times
...
HoangNV
2 years, 2 months ago
That's correct: C
upvoted 2 times
...
M3Ady
2 years, 2 months ago
C is Correct!
upvoted 1 times
...
RazaTheLegend
2 years, 2 months ago
Selected Answer: C
Yup! answer is correct!
upvoted 3 times
...
mr__robot
2 years, 2 months ago
Selected Answer: C
That is correct only
upvoted 1 times
...
jaydenlkl
2 years, 4 months ago
Correct Ans!!
upvoted 1 times
...
MegaLion
2 years, 5 months ago
Selected Answer: C
C Correct
upvoted 2 times
...
ewelaela
2 years, 5 months ago
Selected Answer: C
C Correct
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 ...