Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Benefit of using Preceding load ..

Can someone help me with simple example  to understand how to use preceding load and the advantage of using it ??

I've already gone through few of  the blogs but the advantages have not been clearly called out..

What is preceding load ??   with example

How to use it ?? 

What is the advantage of using it ?    

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

In normal load for some aggregation function like min, max, sum we can't use this function directly in load

so use of precedence load to calculate some field for max and min with group by we use precedence load

and if you do something in normal load with condition like

load A,max( [Above 1000 C]) as Max

group by A;

load A,

B,

if(C>1000,C) as [Above 1000 C]

from datasource;

so it only figure out with field A and  getting the max  value of [Above 1000 C] on the basis of A field so you can do this

Have a look this Script and Reload it on your desktop

test1:

LOAD C,max(Multiply)as Max

Group by C;

LOAD A*B as Multiply, * INLINE [

    A, B,C

    1, 1,SD

    2, 2,WE

    3, 3,SD

    4, 4,QW

    5, 5,QW

    6, 5,WE

];

hope it helps

View solution in original post

7 Replies
Not applicable
Author

Thanks Mohit ,

From your example., I can use the Month(Date) in the Normal load itself if I use this in the Preceding load will that improve the performance ??/

Not applicable
Author

Definition of Preceding load--

if you have a table and suppose there are 10 field in this table,

now if you want to work on some fields of this table  then you can use preceding load.

hope this helps you for understanding the Preceding load

Not applicable
Author

I understood what is preceding load is all about.

But how this is helpful if I use the below

LOAD                   //This section is called preceding load

    *,

     Month(Date) AS Month,

     Year(Date) AS Year;                    

LOAD                    // Normal load.

     Department,

     Date,

     Sales

FROM DataSource;

Just happened to refer Henrick's

QlikView will start from the bottom and pipe record by record to the closest preceding Load, then to the next, etc. And it is always faster than running a second pass through the same table.


Why QV has to pipe the records one by one to the closest preceding load ??  In this case additional load on the memory ??  In the single pass itself  can't we do the transformation while loading the data using the LOAD statement (Normal Load) ??/

er_mohit
Master II
Master II

In normal load for some aggregation function like min, max, sum we can't use this function directly in load

so use of precedence load to calculate some field for max and min with group by we use precedence load

and if you do something in normal load with condition like

load A,max( [Above 1000 C]) as Max

group by A;

load A,

B,

if(C>1000,C) as [Above 1000 C]

from datasource;

so it only figure out with field A and  getting the max  value of [Above 1000 C] on the basis of A field so you can do this

Have a look this Script and Reload it on your desktop

test1:

LOAD C,max(Multiply)as Max

Group by C;

LOAD A*B as Multiply, * INLINE [

    A, B,C

    1, 1,SD

    2, 2,WE

    3, 3,SD

    4, 4,QW

    5, 5,QW

    6, 5,WE

];

hope it helps

Not applicable
Author

Thanks Mohit and the rest.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You may want to take a look at this post on preceding loads?

http://www.quickintelligence.co.uk/preceding-load-qlikview/

Steve