Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LOAD CALCULATE

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.

11 Replies
MayilVahanan

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 & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author