Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Please see attached QVW file. in my table the key columns are combination of Itemkey and Key. And for each row of Item key & key i will have sales price which are active with in the date ranges (fromdate and ToDate). So my problem is whenever they change the price in the database the fromdate is changing but the todate remains the same. for example please see below: for the 3|1495.562.M the Sales price has been changed 3 times. But the Todate has changed only 2 times .
I need help in creating a column which gives me the correct date range when the Todate is not changed then assign correct Todate. The expected result is below highlighted in green.
Thanks for your help in advance....
if I understand, add after your script
Newtest:
load
*,
if(ItemKey<>Peek(ItemKey) or Key<>Peek(Key), todate, date(peek(fromdate)-1)) as new_todate
Resident
Test
order by ItemKey, Key, fromdate desc;
DROP Table Test;
if I understand, add after your script
Newtest:
load
*,
if(ItemKey<>Peek(ItemKey) or Key<>Peek(Key), todate, date(peek(fromdate)-1)) as new_todate
Resident
Test
order by ItemKey, Key, fromdate desc;
DROP Table Test;
thanks a lot massimo ... you helped me a lot man... and i have posted another question in community. do you mind helping me on that http://community.qlik.com/message/695640#695640