Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello good Qlik Community people...
I have 2 warehouses with product QTY's, I need to add the two QTY's into a master table.
What's the simplest way I can achieve this?
Here's a simplified representation of what I'm trying to achieve:
Thanks in advance!!
Cheers...
Fab
You need another table or final table please elaborate
Table1:
LOAD * Inline
[
Product,WH,QTY
A,X,10
B,X,20
C,X,15
];
NoConcatenate
Table2:
LOAD * Inline
[
Product,WH,QTY
A,y,20
B,y,40
C,y,30
];
ResultTab:
LOAD
Product as Prod,
Sum(QTY) as TotalQTY
Resident Table1
Group By Product;
Concatenate(ResultTab)
LOAD
Product as Prod,
Sum(QTY) as TotalQTY
Resident Table2
Group By Product;
NoConcatenate
FinalResult:
LOAD Prod,Sum(TotalQTY) as TotalQTY Resident ResultTab Group By Prod;
DROP Table ResultTab;
OutPut:-
You dont' need anything here.. Consider as expression like below
Dimension is Product
Sum(QTY)
Or
Sum({<WH = {"x","y"}>} QTY)
Concatenate two tables...
Like this you want
You need another table or final table please elaborate
Table1:
LOAD * Inline
[
Product,WH,QTY
A,X,10
B,X,20
C,X,15
];
NoConcatenate
Table2:
LOAD * Inline
[
Product,WH,QTY
A,y,20
B,y,40
C,y,30
];
ResultTab:
LOAD
Product as Prod,
Sum(QTY) as TotalQTY
Resident Table1
Group By Product;
Concatenate(ResultTab)
LOAD
Product as Prod,
Sum(QTY) as TotalQTY
Resident Table2
Group By Product;
NoConcatenate
FinalResult:
LOAD Prod,Sum(TotalQTY) as TotalQTY Resident ResultTab Group By Prod;
DROP Table ResultTab;
OutPut:-
Thanks everyone for your suggestions...
I will see how I can use these concepts on my tables and mark as helpful / correct as applicable...
the example is a bit over-simplified, but the principle is the same...
I have never used concatenate before so it would be good to learn this function...
Thanks again and you will hear from me soon!! ![]()
Find the attached if tables Table1 and Table2 not required then you can use to drop them by
Drop tables Table1,Table2;
Hi,
I am a new to Qlik but tried the above requirement.Please let me know if this is what you are looking for.
TABLE1:
LOAD * INLINE [
Product, WH, QTY
A, X, 10
B, X, 20
C, X, 15
];
TABLE2:
LOAD * INLINE [
Product, WH, QTY
A, y, 10
B, y, 20
C, y, 15
];
Result:
Load Product,sum(QTY)
Resident TABLE1
group by Product;