Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limited Data Loading

Hi I have two different files, one file is have transaction and other file is have country details.

in that having around 10 countries but I want only 2 countries information should be loaded when the time data load into Qlikview(QVW) file.

How can I get that.

please help me

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

LOAD

     Country,

     BranchCode,

     ....

     .....

FROM country_details.txt (txt)

WHERE

    Match( Country , 'India' , 'USA' );

LOAD

     .......

FROM

     transactions.txt (txt)

WHERE

     Exists('BranchCode',BranchCode);

View solution in original post

9 Replies
mjm
Employee
Employee

Hello,

you should look at a WHERE clause, which you can use to restrict the load.

I would look in the help files for more details on the where clause, but basically an example would look like

LOAD

FieldA,

FieldB,

Country

From (filename) where Country='UK' or where Country='Spain';

This would help, but please do check the help file for more exact examples.

Please mark this as helpful if this helps.

Thanks,

petter
Partner - Champion III
Partner - Champion III

LOAD

     *

FROM transaction.txt (txt)

WHERE

     Match( Country , 'India' , 'USA' );

LOAD

     *

FROM country_details.txt (txt)

WHERE

    Match( Country , 'India' , 'USA' );

cesaraccardi
Specialist
Specialist

Hi,

I am not sure I understand what you are looking for but if you have a Country field to link the 2 datasets you could either do a left join from the transaction table which would result in a single table in your data model or you could try using the EXISTS() function on the where clause of the Country dataset to drop all the unrelated Countries.

Hope this helps,

Cesar

tresesco
MVP
MVP

Small correction:

LOAD

FieldA,

FieldB,

Country

From (filename) where Country='UK' or where Country='Spain';

qlikviewwizard
Master II
Master II

Hi,

Please check this example:

COUNTRY_Data:

LOAD * INLINE [

COUNTRY_ID,COUNTRY,SALES

1,Afghanistan,10

2,Albania,20

3,Algeria,30

4,Andorra,40

5,Angola,50

6,Antigua and Barbuda,60

7,Argentina,70

8,Armenia,80

9,Aruba,90

10,Australia,100]

where WildMatch(COUNTRY,'Afghanistan','Angola','Australia');

Capture.PNG

Capture1.PNG

Not applicable
Author

Hi All, thanks for you response...

it is working when both tables having the country details. i'll give some more explanation.

1st table having: Branch_code, country_code, country_name.

2nd table is a concatenate table which is join 1st table based on "Branch_code".

2nd table does not having country only having Branch_code information. when tried the above solution it was not worked.

please give some more clarification...

Thanks

petter
Partner - Champion III
Partner - Champion III

LOAD

     Country,

     BranchCode,

     ....

     .....

FROM country_details.txt (txt)

WHERE

    Match( Country , 'India' , 'USA' );

LOAD

     .......

FROM

     transactions.txt (txt)

WHERE

     Exists('BranchCode',BranchCode);

jonathandienst
Partner - Champion III
Partner - Champion III

>> WHERE

>>     Exists('BranchCode',BranchCode);

WHERE Exists(BranchCode);   should suffice

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks all for you help

it is working...

Thanks.