Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can somebody give me detail explanation of below Calculated dimesion:
=$(=FirstSortedValue('[' & %Dimension & ']',[%Dimension Position],1))
Regards,
Mahamed Khan
Hi,
This expression Will return the First %Dimension Field Value based on %Dimension Position Sorting. Normally Ascending order, if you give minus ' - ', it means Descending order.
For e.g if you have the data like the below
[%Dimension] | [%Dimension Position] |
Dim3 | 3 |
Dim2 | 1 |
Dim1 | 2 |
if you use =FirstSortedValue(%Dimension,[%Dimension Position]), you will get the result Dim2
from help:
firstsortedvalue([{set_expression}][ distinct ] [ total [<fld {, fld}>]] expression [, sort_weight [, n]])
=$(=FirstSortedValue('[' & %Dimension & ']',[%Dimension Position],1))
'[' & %Dimension & ']'
=> This is just combining the field, suppose if you have space in the Field name.
e.g Employee Name returns = > [Employee Name]
=> 1 -> Just a record number
In the above, example, if you give =FirstSortedValue(%Dimension,[%Dimension Position],2) => You will get 'Dim2'
See the Qlikview Help, if you need more info.
1) This expression will sort the all values of ,[%Dimension Position] field.
2) After that it will find the 1st value from the ,[%Dimension Position].
3) And finally it will return the corresponding value to the 1st value from %Dimension filed.
Let say:
%Dimension %Dimension Position
A 4
B 2
C 1
D 3
=$(=FirstSortedValue('[' & %Dimension & ']',[%Dimension Position],1)) will return--> C
Hope this will help you…!!
Regards,
Sandip Satbhai
Hi Settu,
Thank you for your kind response.
Just want to know is there any specific need for entering record number (In Above example stated as value 1) or we can neglect tht as well?
Normally it gives the top value based on the Order. If you want the first value you can neglect it.