Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Sirs ,
Please help me . I want load only those rows of data in Table 2 , which has present in the table 1 of column Top_Grp .
I do not want to using explicit joins .
Help please .
You can use where exists:
Table1:
LOAD Top_Grp,
[Base Region],
Pitch
FROM
(ooxml, embedded labels, table is Table);
Table2:
LOAD Top_Grp,
Items,
Date,
Price,
Region,
Defect_History,
Gender_In_Invoice,
F8,
F9
FROM
(ooxml, embedded labels, table is Table2) Where Exists (Top_Grp);
Drop Table Table1;
You can use where exists:
Table1:
LOAD Top_Grp,
[Base Region],
Pitch
FROM
(ooxml, embedded labels, table is Table);
Table2:
LOAD Top_Grp,
Items,
Date,
Price,
Region,
Defect_History,
Gender_In_Invoice,
F8,
F9
FROM
(ooxml, embedded labels, table is Table2) Where Exists (Top_Grp);
Drop Table Table1;
Sir , please explain Where Exists (Top_Grp)
Hi Prahlad
Using the SampleData you sent, you could do the following or see attached QVW.
I've used KEEP which is not an explicit join, but just keeps everything from one table that has common fields with another.
Hope this is helpful to you.
Table1:
LOAD Top_Grp, [Base Region], Pitch
FROM [Sample Data.xlsx] (ooxml, embedded labels, table is Table);
Table2:
LOAD Top_Grp1 as Top_Grp, Items, Date, Price, Region, Defect_History, Gender_In_Invoice
FROM [Sample Data.xlsx] (ooxml, embedded labels, table is Table);
Table3:
LEFT KEEP (Table1) LOAD * Resident Table2;
DROP TABLES Table2, Table1;
That means that it will only load the values of Top_Grp that exist in Table1, in this case Sony and Dell Inc
Thank you Sir . But my confusion is that field Top_Grp , exist in Both table and it can not be estimated which Top_Grp (from table 1 or 2 ) to refer
You don't need to refer to which table Top_Grp belongs to. Qlik automatically links columns which are named the same.
The 'Where Exists' and 'Keep' statements will look at all the data that has already been loaded and only include data that joins via the specified or common field values.