DAX Function Guide

PREVIOUSQUARTER
Empty image or helper icon

Sam McKay

CEO & Founder

How does the PREVIOUSQUARTER 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.
PREVIOUSQUARTER Formula Syntax

PREVIOUSQUARTER(
     <dates>
)

How do you use the PREVIOUSQUARTER?

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.
Related Blog Posts

Loading

Considerations when using the PREVIOUSQUARTER?

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

Loading

Formula examples using the PREVIOUSQUARTER

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

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

Related Courses

Loading