Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
WHat is the FirstSortedValue() ?? Can anyone explain with example ??
Thanks
If you got your answer, kindly mark helpful or correct answer and close the post.
Regards
hi,
firstsortedvalue () , is nothing but we can work on two perameters .
1). string value
2). numeric value,(only stright table & pivot table) it ;ll work.
For Example:
1).firstsortedvalue(name,-sales) it 'll display the lowest value in the sales
2).firstsortedvalue(name,sales) it 'll display the highest value in the sales
nerchukuntunnara leka working in any org?
em enduku ..............
urkane brother
Just to clear up the use of the "-" symbol in the second parameter. When the negative symbol is used, it will sort the maximum to be first. If it is left out, it sorts the minimum to be first.
So for something like:
Group Day Value
A 1 100
A 2 75
A 3 20
if we do:
FirstSortedValue(Day, Value) ------- returns 3
FirstSortedValue(Day, -Value) ------- returns 1
From Qlikview Help:
firstsortedvalue([{set_expression}][ distinct ] [ total [<fld {, fld}>]] expression [, sort_weight [, n]])
returns the first value of expression sorted by corresponding sort-weight when expression is iterated over the chart dimension(s). Sort-weight should return a numeric value where the lowest value will render the corresponding value of expression to be sorted first. By preceding the sort-value expression with a minus sign, the function will return the last value instead. If more than one value of expression share the same lowest sort-order, the function will return null. By stating an n larger than 1, you will get the nth value in order.
Hope this helps!