Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I need some brief conceptual on Above, Below , Dual and how these are used with Total function with an example
Hi,
Above() - Will give you the previous row column value in the current row in Straight or Pivot table or charts. Refer help file for more detailed help.
Example: Above([Sales], 1) - Gives you the Sales (Expression name) value in the previous row
Above([Sales], 2) - Gives you the Sales (Expression name) value in the second previous row
Above(Sum(SalesAmount), 1) - Gives you the Sum(SalesAmount) value in the previous row
Below() - Will give you the next row column value in the current row in Straight or Pivot table or charts. Refer help file for more detailed help.
Example: Below([Sales], 1) - Gives you the Sales (Expression name) value in the next row
Below([Sales], 2) - Gives you the Sales (Expression name) value in the second next row
Below(Sum(SalesAmount), 1) - Gives you the Sum(SalesAmount) value in the next row
Dual() - Forced association of an arbitrary string representation s with a given number representation x. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. This function can be used in scripts and chart expressions.
This is used when we are handling Months/Days especially,
load dual ( string,numrep ) as DayOfWeek inline
[ string,numrep
Monday,0
Tuesday,1
Wednesday,2
Thursday,3
Friday,4
Saturday,5
Sunday,6 ];
load Date, weekday(Date) as DayOfWeek from afile.csv;
The script example will generate a field DayOfWeek with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field.
Hope this helps you.
Regards,
Jagan.