Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combining a table field with another one

Hello All,

     this is a sort of simple concept. But I dont know it. And because of it, I struck in many situations.

     My question is this. How can I combine a field of a table with the another table.

     Assume I have a table as below:

     Sales:

     Load Sales,

             Margin

     FROM [Data\Sales.qvd] (qvd);

     and another table is:

     Invoice:

     Load InvoiceDate,

               Year,

               Month,

               Day

       From [Data\Invoice.qvd] (qvd);

     Now I need to combine InvoiceDate to Sales table.

     Any Solutions ll be appreciated.

     Thanks in advance.

3 Replies
erichshiino
Partner - Master
Partner - Master

Hi,

Can you provide some data samples? A few lines of each table and the results you want to achieve?

gussfish
Creator II
Creator II

Hi Rajan,

given the way that you have stated your problem, there is no solution.  This is not a QlikView problem but a fundamental data problem.  That is, you would not be able to do this with any product, because your tables have insufficient information.

The key question for you to think about is this: would you be able to manually combine these tables using a spreadsheet?  At the moment, you cannot, because your Invoice table only contains date information, and your Sales table has no date information - they are completely different information, with nothing in common that enables you to link them together.

I'm guessing that Sales is meant to be individual line items on the invoices.  If this is so, then you need to have a way to uniquely identify each Invoice (e.g. an Invoice Number) and make sure that is part of the Invoice table; and for each line item in the Sales table, you need a reference to the Invoice that it belongs to (i.e. add a column to contain its Invoice identifier).

Hope this helps,

Angus.

Not applicable
Author

Hi erich,

     I ve mentioned some of the neccessary field names in my post above. you can use that.

     The result should be like this:

     the table Sales

     should contain the Year of the Invoice table.

     Because I need to calculate the Sales & Margin Amount corresponding to each year 2006, 2007, 2008....

     Thanks.