How does the PREVIOUSQUARTER function (DAX) work?

The PREVIOUSQUARTER function (DAX) returns a table that contains a column of all dates from the previous quarter, based on the first date in the dates column, in the current context.



How do you use the PREVIOUSQUARTER function?

The dates argument can be any of the following:

  • A reference to a date/time column.
  • A table expression that returns a single column of date/time values.
  • A Boolean expression that defines a single-column table of date/time values.

This DAX function is not supported for use in DirectQuery mode.

Related Blog Posts

Related Support Forum Posts

Chart x-axis displayed upon date range slicer
Custom quarter ending on 3rd Friday of quarter’s last month
Quarter On Quarter Sales Trends In Power BI – DAX Formula

Considerations when using the PREVIOUSQUARTER function

Constraints on Boolean expressions −

  • The expression cannot reference a calculated field.
  • The expression cannot use CALCULATE function.
  • The expression cannot use any function that scans a table or returns a table, including aggregation functions.

However, a Boolean expression can use any function that looks up a single value, or that calculates a scalar value.

Related Video Tutorials

Formula examples using the PREVIOUSQUARTER function

CALCULATE ( SUM ( ‘Table'[Revenue] ); ALL ( ‘Table’ ); PREVIOUSQUARTER ( ‘Table'[Revenue Date] ) )

=CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PREVIOUSQUARTER(‘DateTime'[DateKey]))

Related DAX Functions


Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide