Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining tables

Hello all

Ok, I have a question about joining some tables.

I have following tables.

fact:

productN, product type, orderN, customerN

321654, A, 50, 132

987654, B, 20, 423

654987, C, 13, 512

so on. I have 2 tables contains information for product A B and others.

type_AB:

orderN, information

type_other:

customerN, information

how do I join them? Feel free for any suggest.

Regards.

Muncho

14 Replies
Not applicable
Author

As I don't know the purpose It's very hard to help out.

let me get this straight - You need to join two information tables to your facts table. Your keys are orderN and customerN. Do you also need product type in the key?

Not applicable
Author

i have 2 information table. first information table have orderN key field and it should join where product type A and B in fact table. Second table should join where not product type A and B. key is customerN.

Hope you got it know.

vincent_ardiet
Specialist
Specialist

Hi Muncho,

If I undestand what your are trying to do :

- Rename in your fact table orderN and customerN (example orderN_origin and customerN_origin) ;

- Add in fact a calculated column named orderN as : if(match([product type],'A','B')>0,orderN_origin) ;

- Add in fact a calculated column named customerN as : if(match([product type],'A','B')=0,customerN_origin) ;

You will obtain 

productN, product type, orderN, customerN, orderN_origin, customerN_origin

321654, A, 50,    , 50, 132

987654, B, 20,    , 20, 423

654987, C,    , 13, 13 , 512

Then you can join your tables.

Regards,

Vincent

Not applicable
Author

Hello Vincent,

Ok. I got your your idea.

Thank you very much ^^

Not applicable
Author

See if this sample can help you.