Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community.
I have this situation
DATE_FROM | DATE_FROM_DATE_TO | IN_PORTFOLIO | GO | SPECT |
201506 | 201506|201507 | 9 | 1 | 8 |
201506 | 201506|201508 | 9 | 6 | 2 |
201506 | 201506|201509 | 9 | 2 | 0 |
201507 | 201507|201508 | 11 | 7 | 4 |
201507 | 201507|201509 | 11 | 4 | 0 |
I have all of this fields, but i need to calculate in script SPECT field.
Can sameone help me.
Hi
Try like this
LOAD *,
IF(DATE_FROM_DATE_TO = Peek('DATE_FROM_DATE_TO'), PEEK('SPECT'), If(DATE_FROM = Peek('DATE_FROM'), Peek('SPECT') - GO, IN_PORTFOLIO - GO)) AS SPECT;
LOAD ID,
DATE_FROM,
DATE_FROM_DATE_TO,
IN_PORTFOLIO,
GO
FROM
[http://community.qlik.com/thread/150786]
(html, codepage is 1252, embedded labels, table is @2);
thanks Mayil Vahanan Ramasamy!!