PREVIOUSDAY Function (DAX)

How does the PREVIOUSDAY function (DAX) work?

The PREVIOUSDAY function (DAX) returns a table that contains a column of all dates representing the day that is previous to the first date in the dates column, in the current context.

PREVIOUSDAY Formula Syntax

PREVIOUSDAY(
     <dates>
)

How do you use the PREVIOUSDAY function?

This function determines the first date in the input parameter, and then returns all dates corresponding to the day previous to that first date. For example, if the first date in the dates argument refers to June 10, 2009; this function returns all dates equal to June 9, 2009.

Related Blog Posts

Related Support Forum Posts

How to calculate Exponential Moving Average to show Fitness and Fatigue
Today vs Yesterday
Dax Calculation question

Considerations when using the PREVIOUSDAY 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.

Related Video Tutorials

Formula examples using the PREVIOUSDAY function

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

= CALCULATE ( SUM (Sales[Sales Amount]),PREVIOUSDAY (Sales[Date]) )

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


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
Membership