The Power BI NEXTMONTH function is one of the DAX Date and Time functions useful for returning a table that contains all dates from the next month based on the first date of a given date. This article explains the POWER BI DAX NEXTMONTH function, which accepts the date value and uses the current context to return a column of all dates from the next month. The syntax is shown below.
NEXTMONTH(<dates>)
Power BI DAX NEXTMONTH function Example
To demonstrate the DAX NEXTMONTH() function, click the New Table button on the Modeling Tab and rename it as NextMonthSales. The expression below calculates and shows the sum of the sales amount for the next OrderDate month in the FactInternetSales table. Please check the sales of the 28-02-2011 and 01-03-2011 dates. Here, 4,85,198.6594 is the February 2011 sum of the sales, and 5,02,073.8458 is the March sales.
NextMonthSales = CALCULATE(SUM(FactInternetSales[SalesAmount]), NEXTMONTH(FactInternetSales[OrderDate]))
The expression below creates a measure that calculates and shows the sum of the Sales Amount in the next OrderDate month CalendarTable generated by the CALENDAR function.
Add the Year of OrderDate, Sales Amount, and the sum of the next Month’s sales to the table report. It compares both the present month’s sales against the next month’s sales. Please refer to the DateTime and function article for the remaining Power BI methods. For more Charts >> Click Here.
NextMonthCalSale = CALCULATE(SUM(FactInternetSales[SalesAmount]), NEXTMONTH(CalendarTable[Date]))