pl-300 Practice Question 1931

Exam: pl-300
Domain: Model the data
Topic: Create model calculations by using DAX
Difficulty: medium
In a Power BI report, you need to calculate the total sales for the current year and compare it with the previous year's sales. Which DAX function should you use to ensure that the comparison is done on the same period of the previous year, considering the fiscal year starts in April?

Answer Options

A
CALCULATE
B
SAMEPERIODLASTYEAR
C
FILTER
D
TOTAL

Correct Answer

B: SAMEPERIODLASTYEAR

Explanation

The correct answer is `SAMEPERIODLASTYEAR` because it aligns the dates from the current year with the corresponding dates from the previous year, taking into account the fiscal year start date. `CALCULATE` alone would not adjust the context based on the fiscal year, `FILTER` would only apply a condition without changing the context, and `TOTAL` would sum up all values without considering the time context.

Related Practice Questions