kushal i need to generate a table like the second one, with the fields Q_DAYS, Q_DAYS_REASON and TOTAL_Q_DAYS
I made an excel like the attachment but i need to make the fields in a large table in qlikview script.
I hope I have explained well
thanks in advance!
test.xlsx 12.1 K
Date(If(ID = Previous(ID), RangeMax(Peek('date_to'), Peek('max_date_to')), date_to)) as max_date_to,
If(ID = Previous(ID), If(date_to > Previous(date_to), RangeSum(date_to, -RangeMax(Peek('date_to'), Peek('max_date_to'))), 0), date_to - date_from + 1) as Q_DAYS_REASON;
LOAD RecNo() as SerialNo,
date_to - date_from + 1 as Q_DAYS
(html, codepage is 1252, embedded labels, table is @1);
Left Join (Table)
Max(date_to) - Min(date_from) + 1 as TOTAL_Q_DAYS
Group By ID;
255647.qvw 158.0 K