Discussion Board for collaboration on QlikView Scripting.
Hey guys, I have a simple question:
I want to create a field that says that the current position is "2" (last one started). I tried to use this:
IF(Status=PREVIOUS(Status),'',Sequence) as Current_Position.
The problem with that, is that also counts the headers, so, number "1" always come in this field, and I don't want that, i want simply to show "number 2".
How can I do that?
Go to Solution.
You could so this after loading the data in your post:
LOAD Max(Sequence) As LastStart
'Started' As Status
RESIDENT Data WHERE Status = 'Started';
To get that into a variable, use Peek()
Thanks it did work well! I would like to get also the number of the last item in the table. how do I do that?
Something like this should do the trick:
LET vLastItem = PEEK('FieldName', NoOfRows('TableName')-1, 'TableName');