<!-- https://learnsql.cpetoday.com/functions/dax/previousquarter -->
# PREVIOUSQUARTER

Language: DAX
Category: Time intelligence: shift and compare
Syntax: PREVIOUSQUARTER(<dates>)
Summary: Returns all the dates of the calendar quarter before the first date in the filter context.
Returns: A table of dates.
Level: Intermediate
Related: PREVIOUSMONTH, PREVIOUSYEAR, NEXTQUARTER, PARALLELPERIOD, DATEADD

## What it does
PREVIOUSQUARTER returns every date in the quarter before the one in context. A measure built on it shows the whole of last quarter, regardless of which month of the current quarter is visible. Finance teams use it for quarter-over-quarter growth, for the quarter-end balance review, and for the prior quarter's results in a board pack.

## Syntax and arguments
- dates: the date column of the Calendar table. Required.

## Example
A quarterly board pack shows revenue for each quarter next to the quarter before it. In the Q4 2026 column, the prior quarter is Q3 2026.

```dax
Revenue Prior Quarter = CALCULATE([Total Revenue], PREVIOUSQUARTER('Calendar'[Date]))

Revenue QoQ % = DIVIDE([Total Revenue] - [Revenue Prior Quarter], [Revenue Prior Quarter])
```

Revenue Prior Quarter adds up July, August and September 2026 in the Q4 2026 column. The quarter-over-quarter percentage compares two full quarters.

## Example: a second, different use
A budget comparison against last quarter: the actual result for the quarter before, next to the budget for that quarter.

```dax
Budget Prior Quarter = CALCULATE([Budget Revenue], PREVIOUSQUARTER('Calendar'[Date]))
```

## Things to watch
- It uses calendar quarters. A fiscal quarter needs a filter on the fiscal columns of the Calendar.
- It returns the full quarter even when the current quarter is partial. Use DATEADD with QUARTER when you want the same point in the prior quarter.
- For a balance such as receivables, use CLOSINGBALANCEQUARTER rather than a sum over the quarter.
- Needs a complete Calendar with no gaps.

## In business terms
PREVIOUSQUARTER supports quarter-over-quarter reviews, board pack comparisons, and budget versus prior quarter analysis. Quarter-end close teams use it to compare the current result with the one they closed.
