Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

chris987
Not applicable

Script : how to create table of accumulations

hi all,

I'm new in Qlikview.

Id to like create a Table of accumulations with data from a QVD.

Original Data  :

ItemCustomer N°PriceQtyDateYearweekMonth

123456C13134515$82011/09/01201120113509
321456C13134512$22011/09/13201120113709

I’d like the Table of accumulations to look like this :

Customer N°
YearMonthWeekActivity
C131345
2011092011351
C131345
201109201136

0

C131345
2011092011371

etc.

if sales <> 0 then Activity = 1 else Activity = 0

Maybe, another solution exists.

Is it possible in script ?


Thank for your help

Chris.

3 Replies
Not applicable

Re: Script : how to create table of accumulations

Load

[Customer N°],
Year,

Month,

Week,

if(sales <> 0,1,0) as  Activity

From [document path here ] (qvd);

Assuming there is a field called Sales. Other wise just write the condition in if statement

If there is no sales field try Quantity>0 condition

Not applicable

Re: Script : how to create table of accumulations

Hi,

u can do somthing like this.

i hope this help

Stefano

chris987
Not applicable

Script : how to create table of accumulations

Hi,

Stefano your idea is not possible for me, i have more 3 millions lines in my database, and the loading is too long.

I have clear my project, and find another way.

thanks for your help.