Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

How to partial laod a field to display last 1 month sales ?

Hi All

I need to get a field for check last 1 monthj company sales amount .

so i create a partial load script below :-

left join    (sales)

   

Load desc,

sum(if(Month_n<2,sales)) as L6MS

Resident sales group by desc;

Result I wanted  :-

Table 1 return correct value 314,474

Table 2 return wrong value. how to make table 2 display 314,474 ?

The reason i make use of Month_n is so that i can replace Month_n<2 to 6 , finally i want to get their last 6 month sales amount.

Paul

3 Replies
Not applicable

Re: How to partial laod a field to display last 1 month sales ?

Hi

can u try this:

left join    (sales)

  

Load desc,

sum(sales)as L6MS

Resident sales group by desc where Month_n>=2 and Month_n<=6 ;

Not applicable

Re: How to partial laod a field to display last 1 month sales ?

hey sorry

try this:

Resident sales group by desc where Month_n=1;

paulyeo11
Valued Contributor II

Re: How to partial laod a field to display last 1 month sales ?

Hi Pru

I prefer to make use of script like :-

sum(if(Month_n=1,sales)) as L6MS

as in my actual QV doc , i have many other script , so i cannot make use where command here.

Paul

Community Browser