Читати англійською Редагувати

Поділитися через


NEXT

Applies to: Calculated column Calculated table Measure Visual calculation

Used in visual calculations only. Retrieves a value in the next element of an axis in the visual matrix.

Syntax

NEXT ( <column>[, <steps>][, <axis>][, <blanks>][, reset] )

Parameters

Term Definition
column The column to be retrieved.
steps (Optional) Indicates the number of rows to go forward to fetch the value. If omitted, 1 is used (the exactly next row).
axis (Optional) An axis reference. If omitted, the first axis of the Visual Shape definition is used.
blanks (Optional) An enumeration that defines how to handle blank values when sorting.
The supported values are:
  • DEFAULT(the default value), where the behavior for numerical values is blank values are ordered between zero and negative values. The behavior for strings is blank values are ordered before all strings, including empty strings.
  • FIRST, blanks are always ordered on the beginning, regardless of ascending or descending sorting order.
  • LAST, blanks are always ordered on the end, regardless of ascending or descending sorting order.
reset (Optional) Indicates if the calculation resets, and at which level of the visual shape's column hierarchy. Accepted values are: a field reference to a column in the current visual shape, NONE (default), LOWESTPARENT, HIGHESTPARENT, or an integer. The behavior depends on the integer sign:
- If zero or omitted, the calculation does not reset. Equivalent to NONE.
- If positive, the integer identifies the column starting from the highest, independent of grain. HIGHESTPARENT is equivalent to 1.
- If negative, the integer identifies the column starting from the lowest, relative to the current grain. LOWESTPARENT is equivalent to -1.

Return value

The value of column from the next element of the axis.

Remarks

This function can only be used in a visual calculation.

Example

The following visual calculation returns the sales amount of the next row on ROWS axis, that resets on the lowest parent.

NextInternetSalesAmount = NEXT ( [Sum of SalesAmount], ROWS, LowestParent )

The screenshot below shows the visual matrix and the visual calculation expression:

DAX visual calculation

FIRST LAST PREVIOUS