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,
Syntax:
Below([TOTAL] expr [ , offset [,count ]])
Return data type: dual
Arguments:
Argument | Description |
---|---|
|
The expression or field containing the data to be measured. |
|
Specifying an 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
Limitations:
Recursive calls will return
Examples and results:
Example 1:
In the table shown in screenshot for Example 1, the table visualization is created from the dimension
The column
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 Qlik Sense. Qlik Sense evaluates the functions based on the column segments that result from the dimension that is sorted last. The column sort order is controlled in the properties panel under Sorting and is not necessarily the order in which the columns appear in a table.Please refer to Example: 2 in the
Example 2: |
Result | ||
---|---|---|---|
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: