Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ajsjoshua
Specialist
Specialist

Script

Hi all ,

This is my scenario ,i hav two calendars upload and forecast.

Each upload week has 12 forcast weeks.

each id has lock periods

in dashboad im using only Upload calendar.

If i select Upload week 1  in the calendar which has 12 forcast week ,

and it has two possible ids 1 and 2 which has different lock period.

if id 1 has selected

now i want to calculate

forecast week 1 + id l has lock period 1 = 2

so i want to display sales for the forecast week  2

I achieved it in set analysis but the dashboard loading time is high so i want to achieve it in script itself ....

PFA

Regards,

Joshua

1 Solution

Accepted Solutions
sunny_talwar

Try the attached.

Note: In order to reload the application, I had to export the data from the application. So changed the calculated date column with an actual date extracted from the application. You might have to keep a note of these minor changes I had to make in order to make it work.

Script for the flag:

TEMP:

NoConcatenate

LOAD *

Resident upload;

Join (TEMP)

LOAD *

Resident Forcast;

FinalTable:

LOAD Key,

  If(Week_UPs + [lock period] = Week_Fs, 1, 0) as Flag

Resident TEMP;

DROP Table TEMP;

New Expression:

=Sum({<Flag = {1}>} sales)

View solution in original post

3 Replies
sunny_talwar

There are so many objects in your attached sample and I don't even know what is required to be moved to script? Can you may be clean up the attached file and re-post?

ajsjoshua
Specialist
Specialist
Author

Thanks for ur reply Sunny T

PFA

Regards,

Joshua.

sunny_talwar

Try the attached.

Note: In order to reload the application, I had to export the data from the application. So changed the calculated date column with an actual date extracted from the application. You might have to keep a note of these minor changes I had to make in order to make it work.

Script for the flag:

TEMP:

NoConcatenate

LOAD *

Resident upload;

Join (TEMP)

LOAD *

Resident Forcast;

FinalTable:

LOAD Key,

  If(Week_UPs + [lock period] = Week_Fs, 1, 0) as Flag

Resident TEMP;

DROP Table TEMP;

New Expression:

=Sum({<Flag = {1}>} sales)