The Power BI PREVIOUSMONTH function is one of the DAX Date and Time functions useful for returning a table that contains all dates from the previous month based on the first date of a given date. This article explains the POWER BI DAX PREVIOUSMONTH function, which accepts dates and uses the current context to return a column of all dates from the previous month. The syntax is shown below.
PREVIOUSMONTH(<dates>)
Power BI DAX PREVIOUSMONTH function Example
To demonstrate the DAX PREVIOUSMONTH() function, click the New Measure button on the Modeling Tab and rename it as PREVIOUSMONTH. The expression below calculates the sum of the Sales Amount of the previous month’s OrderDate in the FactInternetSales table. Please check the sales of the 30-01-2011 and 01-02-2011 dates. Please refer to the DAX MONTH and DAX NEXTMONTH functions.
Here, 43,421.0364 is the January sales sum, whereas 4,69,823.9148 is the February 2011 sales. To show the same, we have added the OrderDate, Previous Month, Next Month, next day sales, and Sales Amount to the table report. For the remaining charts, visit the Power BI Charts article.
PreviousMonthSales = CALCULATE(SUM(FactInternetSales[SalesAmount]), PREVIOUSMONTH(FactInternetSales[OrderDate]))

The expression below creates a simple measure. It calculates the sum of the Sales Amount of the previous OrderDate month CalendarTable generated by the DAX CALENDAR function. To compare present-month sales against next-month sales, we added the Year of OrderDate, Sales Amount, and the sum of the previous and next Month’s sales.
For December 2010, there are no previous sales in the dataset, so it returns blank. Please refer to the list of Power BI DAX Date and Time functions and the Power BI DAX functions article available on the Power BI tutorial for beginners page for the remaining methods.
PreviousMonthCalSale = CALCULATE(SUM(FactInternetSales[SalesAmount]), PREVIOUSMONTH(CalendarTable[Date]))
