Below - chart function
Below() evaluates an expression at a row below the current row within a column segment in a table. The row for which it is calculated depends on the value of offset, if present, the default being the row directly below. For charts other than tables, Below() evaluates for the row below the current column in the chart's straight table equivalent.
Syntax:
Below([TOTAL] expr [ , offset [,count ]])
Return data type: dual
Argument | Description |
---|---|
expr | The expression or field containing the data to be measured. |
offset |
Specifying an offset n, greater than 1 moves the evaluation of the expression n rows further down from the current row. Specifying an offset of 0 will evaluate the expression on the current row. Specifying a negative offset number makes the Below function work like the Above function with the corresponding positive offset number. |
count |
By specifying a third parameter count greater than 1, the function will return a range of count values, one for each of count table rows counting downwards from the original cell. In this form, the function can be used as an argument to any of the special range functions. Range functions |
TOTAL |
If the table is one-dimensional or if the qualifier TOTAL is used as argument, the current column segment is always equal to the entire column. |
On the last row of a column segment, a NULL value is returned, as there is no row below it.
Limitations:
-
Recursive calls will return NULL.
-
Sorting on y-values in charts or sorting by expression columns in tables is not allowed when this chart function is used in any of the chart's expressions. These sort alternatives are therefore automatically disabled. When you use this chart function in a visualization or table, the sorting of the visualization will revert back to the sorted input to this function.
Example | Result |
---|---|
Below( Sum(Sales) ) |
Returns the value of Sales for the row below the current row. |