DAX function
PREVIOUSMONTH — DAX function reference
The prior month.
Syntax
dax
PREVIOUSMONTH(<dates>)
Examples
dax
CALCULATE(SUM(Sales[Amount]), PREVIOUSMONTH('Date'[Date]))→ A number
dax
VAR ThisMonth = SUM(Sales[Amount])
VAR LastMonth = CALCULATE(SUM(Sales[Amount]), PREVIOUSMONTH('Date'[Date]))
RETURN DIVIDE(ThisMonth - LastMonth, LastMonth)→ Month-over-month growth %
dax
CALCULATE(SUM(Sales[Amount]), PREVIOUSMONTH('Date'[Date]), ALL(Sales[Channel]))→ Prior month total across all channels
Common mistakes & gotchas
- PREVIOUSMONTH always returns the complete prior calendar month regardless of which day is selected — it behaves like PARALLELPERIOD shifted to the full month, not a rolling 30-day window.
- Like other shorthand time-intelligence functions (PREVIOUSQUARTER, PREVIOUSYEAR), it needs a contiguous marked date table; gaps or an unmarked table can return incomplete or blank results with no error.
Related DAX functions
From Time intelligence