Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load script doubt

Hello everyone,

I have data like shown below:

moporder
3/1/201210
4/1/201235
5/1/201263
6/1/201280
7/1/2012120
8/1/2012200
9/1/2012390
10/1/2012638
11/1/20121250
12/1/20122599
1/1/20133200
2/1/20134320
3/1/20137980

But i want change like below in my load script:

mopwithinmonth1month2month3month4month5month6month>6 and <=12month
3/1/20121035638012020039019987
4/1/201235638012020039063819349
5/1/20126380120200390638125018099
6/1/2012801202003906381250259915500
7/1/201212020039063812502599320012300
8/1/201220039063812502599320043207980
9/1/2012390638125025993200432079800
10/1/20126381250259932004320798000
11/1/201212502599320043207980000
12/1/201225993200432079800000
1/1/201332004320798000000
2/1/201343207980000000
3/1/201379800000000

Could you please advise me

Best,

Robert

22 Replies
Not applicable
Author

Hi Sergey,

As per your logic I can't use the below:

LOAD*,

IF(isNull(Peek('sum')),0,Previous(Month6)+Peek('sum')) AS [sum];

I have added some more date in my source data

moporder
3/1/201210
4/1/201235
5/1/201263
6/1/201280
7/1/2012120
8/1/2012200
9/1/2012390
10/1/2012638
11/1/20121250
12/1/2012599
1/1/20133200
2/1/20134320
3/1/20137980
4/1/20133200
5/1/20134320
6/1/20137980

3/1/2012 - [sum] would be colored data but if i apply your logic its sum of all data after 9/1/2012.

As I told you that i want some (Month 7 to Month 12) for [sum] for each mop and if i don't have Month 7 to Month 12 for some mop, its doesn't matter just make zero.

My source data will be automatically updated when the month passes.

hope you understand my logic.

Please advise me.

Best,

Robert

SergeyMak
Partner Ambassador
Partner Ambassador

Yes, I agree, My fault.

Do you need it in Load Script? or can you make your calculations in the chart?

It's faster to do in the chart.

Just use expression RangeSum(Above (Sum(Month6),-1,6))

PFA

Regards,
Sergey
Not applicable
Author

Many Thanks