NEXTQUARTER

The NEXTQUARTER function returns a table containing a column with the dates corresponding to the quarter following the current context.

Syntax

NEXTQUARTER(
    dates
)

Parameters
  • dates: Column containing dates.
Returned value

The NEXTQUARTER function returns a table.

Additional Information

The dates argument can be a reference to a column containing dates, an expression that returns a table with a single column containing dates, or a Boolean expression that defines a table with a single column containing dates.

This function returns the set of dates for the quarter that follows the dates involved in the current context. In other words, the set of dates returned by the function is never part of the current context.

Examples

If, given a table with sales, we define the measure:

Ventas = SUM(FactSales[SalesAmount])

...calculating the total sales, and the measure:

Ventas siguiente trimestre = CALCULATE(
    [Ventas],
    NEXTQUARTER(DimDate[Datekey])
)

...to calculate the sales for the next quarter, and we take both measures to a matrix in which we place months, quarters and years at the head of the rows, the result is the following:

NEXTQUARTER function. Example of use

It can be seen how, for each month and each quarter, the result of the sales calculation for the following quarter actually coincides with the total sales for the following quarter in the current context.

Category
Time intelligence
Submitted by admin on Tue, 12/04/2018 - 11:23