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

Associate table multiple times to another table

Hi,

New to ClikView so sorry if this question is answered multiple places elsewhere! I've looked through the reference and developer guide and don't see a clear answer to this:

I have a customer table: Has a customer ID field.

I have a second table with sales transactional data that has 3 references back to the customer table: customer that ordered, customer that was charged, and customer that product was shipped to.

As I understand it I make associations between the tables by naming fields identically. So my question is do I:

A. Load the Customer table 3 times and each time rename the customer ID field?

B. Load the Customer table 1 time with the Customer ID field listed 3 times with different names ([Customer ID] AS [Ship Cust ID], [Customer ID] AS [Charge Cust ID], [Customer ID] as [Order Cust ID])

C. Some other advanced feature I haven't yet discovered?

I'm guessing option B but was wondering if anyone else had any thoughts on this?

Thanks!

Neil

2 Replies
whiteline
Master II
Master II

I depends on your goals.

Since you have common list of customers for all transactions it seems that your 'Ship', 'Charge', 'Order' analytics belongs to transactional essense.

I think you can Load your Customer table one time with [Customer ID].

Then you can transform your transactional data so that they use only [Customer ID] as reference.

Finally, to keep your 'Ship', 'Charge', 'Order' analytics create separate field fo that in transactional data.

hic
Former Employee
Former Employee

You should load the customer table three times using different field names. See more on my blog:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/08/30/master-table-with-multiple-roles

HIC