Discussion Board for collaboration related to QlikView App Development.
Can you help in getting the latest Index Value from a Table contains
I have seen other discussions as well. But, i could not get the solution.
Orange = Index is 3
Apple = Index is 4
Mango= Index is 4
What you need is firstsortedvalue() function.
Check below links.
If i give
It shows the first date index value.It has to show latest index.
=FirstSortedValue(ACTION_INDEX,-Time_stamp). It results '-'
What i've done :
LOAD * INLINE [
ID, Index, Timestamp
Orange , 3 , 22/05/2017 12:30:00
Orange , 4 , 22/04/2017 14:30:00
Apple , 3 , 15/02/2017 6:30:00
Apple , 4 , 16/03/2017 6:30:00
Dimension : ID
Measure : =FirstSortedValue(Index,-Timestamp)
and works fine ..
Are you sure you dont have null value in your date or index ?
Thank You for your answer. It looks like working when i give separate expression.
I am trying to add this in if with other conditions.It gives error as Invalid Dimension.
can you post your code ?
if( R_NAME = 'M_USER' AND FirstSortedValue(INDEX,-TIMESTAMP) ='3' ,'ForCancellation')
In Dimension formula, It is OK But when i click Apply, it is Invalid Dimension
I dont really understand your goal.
Can you provide sample data or sample application to work on?
I have give this in load script
FirstSortedValue( INDEX,-Time_stamp) as R_C_Index
It gives correct value if there are two values (3,4)for One ID. It gives 3.
But, If a ID contains value 4, then also it shows 3.
It looks like for any id, it shows 3 is the value of R_C_Index