Discussion Board for collaboration on QlikView Scripting.
How to get last 4 EDT1 field values from this list below
check this thread it has several options for top 4
=Subfield(Concat(Distinct EDT1, ';'), ';', count(DISTINCT EDT1))
Subfield(Concat(Distinct EDT1, ';'), ';', count(DISTINCT EDT1)-1)
Subfield(Concat(Distinct EDT1, ';'), ';', count(DISTINCT EDT1)-2)
Subfield(Concat(Distinct EDT1, ';'), ';', count(DISTINCT EDT1)-3)
See attached file
Hi a d,
You can use peek function to get last values.
But can you also be clear, would you like to show these 4 values together or separately and where?
Thanks-But it didn't work.
I am expecting the results the below values only.(Peek will provide only 4 th position of the value)
what Susvith was refering to is where do you need this information ?
in a table ? in a listbox ? as part of your data set ?
I need to have separate 4 values .
I have to apply other calculation during the load based on the 4 EDT1 date values.
I believe you can do this with Peek but don't remember how at this time , but you can do something like this
load * inline
max(EDT1,4) as Max4EDT1
date(EDT1) as Max4EDT1
where EDT1 >= fieldvalue('Max4EDT1',1);
drop tables Max4, temp;
final: NoConcatenate first 4
load * Resident temp order by EDT1 desc;
DROP Table temp;