Discussion Board for collaboration on QlikView Scripting.
I need to populate a create a TABLE while loading (NOT chart). I could use the MIN and MAX function to get the first and last order date. But how to get the corresponding amount?
load * inline
MIN(ORD_YR) AS First_Sale_Yr,
<FIRST_SALES_AMT> // HOW TO GET THE First Sales Amount ?
MAX(ORD_YR) AS Last_Sale_Yr,
<LAST_SALES_AMT> // HOW TO GET THE LastSales Amount ?
SALES_AMT > 0
Go to Solution.
MIN(ORD_YR) as First_Sale_Yr,
MAX(ORD_YR) as Last_Sale_Yr,
Group By ACCNT_ID;
ORD_YR as First_Sale_Yr,
SALES_AMT as First_Sale_Amt
where not peek(ACCNT_ID)=ACCNT_ID
order by ACCNT_ID, ORD_YR;
ORD_YR as Last_Sale_Yr,
SALES_AMT as Last_Sale_Amt
order by ACCNT_ID, ORD_YR desc;
Thank You Very much .. Worked well!
I have been using previous() function for a while and this solution is going to reduce my script substantially