Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combining data from different tables.

I request you to please help me with the following issue.   I have 3 tables.  First one gets the underlying data from database, however the amounts are calculated expressions.  Second one comes from Excel.   In Table 3, I have to display the sum from Table1 and Table 2 ( which are actually 2 pivot tables).  I cloned Table1 as Table3 and added the expression from Table2 to get the total, but it is not coming correctly.  with the help from this forum, I am able to complete the tables 1 and 2.  But I am unable to get table 3.

TABLE1

Product2Product3Product4
Hierarchy1Hierarchy2
abclmn201.00301.00401.00
defopq201.00301.00401.00
ghirst201.00301.00401.00
null3.003.003.00
TOTAL603.00903.001203.00

Notice that in table 1..null is ignored and those values are added to other products.  That row is not shown.

Table 2

Product2Product3Product4
Hierarchy1Blankfield    
xyz110
xyz220
xyz330 (ignore)
TOTAL30

Table 3

Product2Product3Product4
GrandTotalBlankfield     603.00903.01233.00


Also, one more issue is :  When I have a cross tab, (Pivot table), I dont want the headers for the fields on the left side.  For example, I want to hide the headers for Hierarchy1 and Hierarchy2.  How can I supress the header ?

1 Reply
Not applicable
Author

For this situation i would usually use concatenate.

For example:

Table1:

LOAD * INLINE

[

Heirarchy1, Heirarchy2, Product2, Product3, Product4

abc, lmn, 201.00, 301.00, 401.00

def, opq, 201.00, 301.00, 401.00

ghi, rst, 201.00, 301.00, 401.00];

Concatenate

LOAD * INLINE

[

Heirarchy1, Product4

xyz1, 10

xyz2, 20

];

Total:

LOAD

'Grand Total' as Column1,

'Blankfield' as Column2,

sum(Product2) as Product2,

sum(Product3) as Product3,

sum(Product4) as Product4

Resident Table1;

Drop table Table1;

Now the table total will look a lot like the Table 3 you are wanting as a result.

I also have attached a working .qvw for reference.

Hope this helps!