Courseiva
Visualization and ReportingmediumMultiple ChoiceObjective-mapped

DA0-002 Visualization and Reporting Practice Question

A BI analyst is creating a report in Power BI and needs to calculate the total sales for the current year compared to the previous year. Which DAX function should be used to calculate the previous year's sales?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

SAMEPERIODLASTYEAR

SAMEPERIODLASTYEAR returns a set of dates in the previous year for the same period, which is ideal for year-over-year comparisons.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • SAMEPERIODLASTYEAR

    Why this is correct

    SAMEPERIODLASTYEAR returns dates from the previous year for the same period.

  • PREVIOUSYEAR

    Why it's wrong here

    PREVIOUSYEAR is not a standard DAX function; the correct function is SAMEPERIODLASTYEAR.

  • TOTALYTD

    Why it's wrong here

    TOTALYTD calculates year-to-date values for the current year.

  • DATEADD

    Why it's wrong here

    DATEADD shifts dates by a specified interval, but SAMEPERIODLASTYEAR is more direct for year-over-year.

About these practice questions

One of 986 original DA0-002 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.