Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
LOAD
Country,
BranchCode,
....
.....
FROM country_details.txt (txt)
WHERE
Match( Country , 'India' , 'USA' );
LOAD
.......
FROM
transactions.txt (txt)
WHERE
Exists('BranchCode',BranchCode);
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,
LOAD
*
FROM transaction.txt (txt)
WHERE
Match( Country , 'India' , 'USA' );
LOAD
*
FROM country_details.txt (txt)
WHERE
Match( Country , 'India' , 'USA' );
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
Small correction:
LOAD
FieldA,
FieldB,
Country
From (filename) where Country='UK' or where Country='Spain';
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');
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
LOAD
Country,
BranchCode,
....
.....
FROM country_details.txt (txt)
WHERE
Match( Country , 'India' , 'USA' );
LOAD
.......
FROM
transactions.txt (txt)
WHERE
Exists('BranchCode',BranchCode);
>> WHERE
>> Exists('BranchCode',BranchCode);
WHERE Exists(BranchCode); should suffice
Thanks all for you help
it is working...
Thanks.