PREVIOUSYEAR returns the full previous year, not the same day of last year

Create model calculations by using DAX
Answer Correct answer: D — PREVIOUSYEAR expands the May 9, 2024 filter to all of 2023, summing 15 + 20 + 25 = 60.

You have a Power BI semantic model named Model1 that contains two tables named DimDate and FactSales. There is an active relationship between DimDate and FactSales. DimDate is marked as the date table. FactSales contains the following data. Model1 contains the following measure. Previous Year Sales = CALCULATE([Sales Amount], PREVIOUSYEAR('Date'[Date])) You have a report that uses Model1. The report has a single report page that has a page level filter set to May 9, 2024. The result of the Previous Year Sales measure is displayed in a card visual. Which value will appear in the card visual? - image

  1. 10
  2. 15
  3. 35
  4. 60 Correct Answer

Community Votes

B
38%
D
33%
C
29%

38% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

PREVIOUSYEAR('Date'[Date]) returns all dates of the entire previous year relative to the last date in context — with a May 9, 2024 filter it sweeps all of 2023 (15 + 20 + 25 = 60), not just the matching day.

A card visual shows a Previous Year Sales measure using CALCULATE with PREVIOUSYEAR while the report page filters to May 9, 2024, so the displayed value depends on exactly which dates PREVIOUSYEAR expands to.

Treating PREVIOUSYEAR like SAMEPERIODLASTYEAR for a single day — the matching-day value is 15 (option B), but PREVIOUSYEAR's contract is the whole previous year, which is where the popular wrong answers come from.

Community Discussion (7 comments)

gpsaran 👍 6 Selected: D
should it not be 60 because Previousyear calculates for complete calendar year from last year? Even Power BI calculates like that in a matrix.
c034d75 👍 5 Selected: B
The correct option is B, because it relates to the previous year date which is May 9, 2023.
b92fc92 👍 1 Selected: D
I think is D, 15 is the result with SAMEPERIODLASTYEAR()
5bf040d 👍 3 Selected: B
The PREVIOUSYEAR function does not sum all values up to May 9, 2023. Instead, it shifts the filter context to the entire previous year relative to the current filter context. Since the filter context is restricted to May 9, 2024, the PREVIOUSYEAR function shifts the filter to May 9, 2023.
4b88f2d 👍 2 Selected: C
I think is C too, because the key as Anloindian said: PREVIOUSYEAR pulls anything from 2023 to the date they give us.
Anloindian123 👍 3 Selected: C
I agree with C. PREVIOUSYEAR pulls anything from 2023 up to May 9th 2023. SAMEPERIODLASTYEAR is what results in option B
Jasmine121 👍 1 Selected: C
I vote for C

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

PREVIOUSYEAR returns a table of all dates from the previous year given the last date in the current context. The page filter puts the last date at May 9, 2024, so the function expands to every day of 2023. Summing Sales Amount over 2023 from the shown data gives 15 (May 9) + 20 (May 1) + 25 (May 29) = 60. CALCULATE then evaluates [Sales Amount] in that full-year context, so the card displays 60 (D).

Why the Other Options Are Wrong

A (10) is the current-year value for May 9, 2024 — what the measure would show with no time intelligence at all. B (15) equals Sales Amount on the matching day May 9, 2023, which is the behavior of SAMEPERIODLASTYEAR over a one-day filter, not PREVIOUSYEAR's full-year window. C (35) corresponds to 2023 dates up to May 9 (15 + 20), a partial-year slice that no listed time-intelligence function produces for this filter context.

Community Comment Notes

The most-endorsed comment reasons that PREVIOUSYEAR calculates for the complete calendar year from last year, arriving at 60, and notes that Power BI behaves this way in a matrix as well. Another comment correctly identifies 15 as the value SAMEPERIODLASTYEAR would produce, which isolates the distinction the question is testing.

Official Reference

Exam Strategy

When you see PREVIOUSYEAR, immediately think 'full calendar year' rather than 'same month/day'. Do not assume it only shifts the date by one year; it resets the context to Jan 1st through Dec 31st of the prior year. If the question asks for a single-day comparison, look for SAMEPERIODLASTYEAR or DATEADD instead.

Frequently Asked Questions

What is the difference between PREVIOUSYEAR and SAMEPERIODLASTYEAR?

PREVIOUSYEAR returns all dates from the entire previous calendar year, while SAMEPERIODLASTYEAR returns only the corresponding dates from the previous year based on the current filter context.

How does a page-level filter affect PREVIOUSYEAR results?

The filter sets the last date in the context (e.g., May 9, 2024). PREVIOUSYEAR then expands to include every day of the prior year (2023), summing all matching rows regardless of the specific filtered date.

Related Analysis

Practice All PL-300 Questions

Access 116 questions with complete answers and detailed explanations.

View Full PL-300 Practice Test →

← Back to PL-300 Study Guide