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([TOTAL] expression [ , offset [,count ]])
Return data type: dual
||The expression or field containing the data to be measured.|
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.
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
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
Recursive calls will return
Examples and results:
|Customer||Sum(Sales)||Below(Sum(Sales))||Sum(Sales) + Below(Sum(Sales))||Below offset 3||Higher?|
In the representation of the table chart shown in for Example 1, the table is created from the dimension
The table also shows more complex measures, which you can see in the columns labeled: Sum(Sales)+Below(Sum(Sales)),
For the column labeled
The measure labeled
The measure labeled
For charts with more than one dimension, the results of expressions containing the Above, Below, Top, and Bottom functions depend on the order in which the column dimensions are sorted by QlikView. QlikView evaluates the functions based on the column segments that result from the dimension that is sorted last. The column sort order is controlled under Sort and is not necessarily the order in which the columns appear in a table.Please refer to Example: 2 in the
The Below function can be used as input to the range functions. For example: RangeAvg (Below(Sum(Sales),1,3)).
In the arguments for the Below() function,
A table with Customer as dimension gives the following results for the
Data used in examples:
LOAD * INLINE [
crosstable (Month, Sales) LOAD * inline [
] (delimiter is '|');
To get the months to sort in the correct order, when you create your charts, go to the Sort tab of the chart properties, and mark the checkbox Expression under Sort by. In the expression box write Monthnumber.