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

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

pls help me

inputtable:

LOAD *, previous(sales) as prev-----------why should i write this statement here only, my doubt is we have not yet defined sales.

INLINE [

    sales----------here only we are defining pls explain me

    123

    153

    1456

    235

    845

    365

    896

    486

];

outputtable:

LOAD sales,

Peek(sales,3,'inputtable') as peek

     Resident inputtable;

4 Replies
jerem1234
Specialist II
Specialist II

It is not a top down reading. Take a look at Resident Load:

outputtable:

LOAD sales,

Peek(sales,3,'inputtable') as peek

     Resident inputtable;

The table it is reading from is last, this is where it tells it to get the data, in inputtable. Then it performs the necessary calculations.

Same for the first Load you have.

inputtable:

LOAD *, previous(sales) as prev

INLINE [

    sales

    123

    153

    1456

    235

    845

    365

    896

    486

];

So it is getting the info from the INLINE first, then doing the calculations.


Have you tested it out yourself in your script?

Hope this helps!

Not applicable
Author

s result is ok .previous we can use with in the load statement or outside .if u have any example like this pls send me thanks in advance

maxgro
MVP
MVP

extract from here

LOAD data into QlikView

hope it helps you

The basic syntax is:

LOAD * INLINE [

Field1, Field2, Field3

Value11, Value21, Value31

Value12, Value22, Value32

];

Please notice that:

- You may enter as many fields as you want

- The field names of the table or the star (*), the functions are before INLINE and the brackets ([]): the names are the one of the target table

- The field names are also just after the open bracket ([) first line: the names are the one of the data source

- The fields and values are separated with a comma (,) but the end of line has no comma

You may:

- Replace the [] with double quotes (").

- Use a function to format the fields before the INLINE statement

- Rename the input fields

- Use several times a single input

Example:

Temp:

Load

Field1,

Date(Date#(Field2, 'DD-MM-YYYY')) as Field2,

Field3,,

Field4

Inline [

Field1,Field2,Field3,Field4

A, 01-01-2013, 200, 100

B, 01-01-2013, 100,300

C, 01-01-2013, 300,400

A, 02-02-2013, 0,500

];

As you see with this example, the field names appear twice. We use a function to format the date but the other 3 fields are not

modified.

Please notice that:

- The names of the columns of the table (Col1 …) and those of the source (NomCol1 …) are not necessarily the same: you

can rename all or some of them

- The number of columns may also be different: an input field may be used several times to compute several columns

Christian_Lauritzen
Partner - Creator II
Partner - Creator II

Manoj,

It is confusing. It is called Preceding load. You add a load statement before the Inline, even though sales is not defined, and ending that load statement with a semi colon. No FROM or RESIDENT. It will then later be "filled up" by your Inline, or any other load. A bit upside down, but Henric Cronström explains the concept quite clearly here.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load

Christian

Email: christian.lauritzen@b3.se