nerdexam
Microsoft

PL-300 · Question #370

You have a Power BI model that contains the following data. The Date table relates to the Sales table by using the Date columns. The model contains the following DAX measure. Total Sales = SUM(Sales[S

The correct answer is A. CALCULATE ( [Total Sales], DATEADD (Date[Date], -1, QUARTER ) ). To calculate a measure for a previous quarter, the DAX CALCULATE function combined with DATEADD is used to shift the filter context by a specified period.

Submitted by jian89· Apr 18, 2026

Question

You have a Power BI model that contains the following data. The Date table relates to the Sales table by using the Date columns. The model contains the following DAX measure. Total Sales = SUM(Sales[Sale]) You need to create another measure named Previous Quarter to display the sales one quarter before the selected period. Which DAX calculation should you use?

Exhibit

PL-300 question #370 exhibit

Options

  • ACALCULATE ( [Total Sales], DATEADD (Date[Date], -1, QUARTER ) )
  • BCALCULATE ( [Total Sales], DATESQTD (Date[Date] ) )
  • CTOTALQTD ( [Total Sales], Date[Date] )
  • DCALCULATE ( [Total Sales], PARALLELPERIOD (Date[Date], 1, QUARTER ) )

How the community answered

(45 responses)
  • A
    80% (36)
  • B
    7% (3)
  • C
    11% (5)
  • D
    2% (1)

Why each option

To calculate a measure for a previous quarter, the DAX CALCULATE function combined with DATEADD is used to shift the filter context by a specified period.

ACALCULATE ( [Total Sales], DATEADD (Date[Date], -1, QUARTER ) )Correct

The `CALCULATE` function modifies the filter context for the `[Total Sales]` measure, and `DATEADD(Date[Date], -1, QUARTER)` shifts the current date context back by one quarter, effectively calculating sales for the previous quarter.

BCALCULATE ( [Total Sales], DATESQTD (Date[Date] ) )

`DATESQTD` calculates Quarter-To-Date values, not values for a previous quarter.

CTOTALQTD ( [Total Sales], Date[Date] )

`TOTALQTD` calculates Quarter-To-Date values, not values for a previous quarter.

DCALCULATE ( [Total Sales], PARALLELPERIOD (Date[Date], 1, QUARTER ) )

`PARALLELPERIOD(Date[Date], 1, QUARTER)` would calculate sales for the *next* quarter because the second argument is a positive '1' interval; for the previous quarter, it should be -1.

Concept tested: DAX time intelligence functions

Source: https://learn.microsoft.com/en-us/dax/dateadd-function-dax

Community Discussion

No community discussion yet for this question.

Full PL-300 Practice