Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all..
I am quite inexperienced with using qlikview.
I have been trying to use 3 FOR loops. But am unable to get the syntax right.
Any help with the code would be very helpful.
I have 3 input data tables.
WH | Handling_WH |
WH1 | 100 |
WH2 | 200 |
City | Handling_city |
C1 | 10 |
C2 | 20 |
Plant | Handling_plant |
P1 | 1,000 |
P2 | 2,000 |
I am looking for creating a table this way. For each plant, for each WH, all Cities are to be taken and the Total needs to be calculated.
Plant | WH | City | Handling_plant | Handling_WH | Handling_city | Total_Handling |
P1 | WH1 | C1 | 1,000 | 100 | 10 | 1,110 |
P1 | WH1 | C2 | 1,000 | 100 | 20 | 1,120 |
P1 | WH2 | C1 | 1,000 | 200 | 10 | 1,210 |
P1 | WH2 | C2 | 1,000 | 200 | 20 | 1,220 |
P2 | WH1 | C1 | 2,000 | 100 | 10 | 2,110 |
P2 | WH1 | C2 | 2,000 | 100 | 20 | 2,120 |
P2 | WH2 | C1 | 2,000 | 200 | 10 | 2,210 |
P2 | WH2 | C2 | 2,000 | 200 | 20 | 2,220 |
Thanks in advance.
Ragha
Hi Ragha,
You should be able to do:
Table1:
Load
*
From Table1.xyz
join
Load
*
From Table2.xyz
join
Load
*
From Table3.xyz
FinalTable:
Load
*,
Handling_plant + Handling_WH + Handling_city as Total_Handling
Resident Table1;
Drop table 1;
Hi Ragha,
You should be able to do:
Table1:
Load
*
From Table1.xyz
join
Load
*
From Table2.xyz
join
Load
*
From Table3.xyz
FinalTable:
Load
*,
Handling_plant + Handling_WH + Handling_city as Total_Handling
Resident Table1;
Drop table 1;
Thanks Johannes.
Concepts on Join were not clear for me.
Thanks again.