Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to join the tables by three criteria?

Dear Experts,

        I have three tables and I would like to join these table for the aggregation purpose.

My purpose is to show which Ac_No are belongs to which Department. But I would like to show only Ac_No in Customer Account(20698586763665702) these have same Reference_No and not to show in (330601017). Hope to help me.

Best Regards,

Kyaw Myo Tun

6 Replies
Employee
Employee

Re: How to join the tables by three criteria?

Hi Kyaw,

When you load data into QlikView it will automatically join table with a full outer join based on common field names.  In your case you have common field names (Ac_No and Department) all you need to do is load the data.  I would highly recommend you take a look at Creating a Data Model video and the other New to QlikView Videos

-Josh

Qlik

Re: How to join the tables by three criteria?

Would you be able to share your data in an Excel file??

svenkita
Contributor II

Re: How to join the tables by three criteria?

If you want it all in one table

Table1:

Load Reference_No , Ac_No, Product;

SQL SELECT * FROM <TABLE1>;

Left Join (Table1)

Load Ac_No, Department;

SQL Select * From <Table2>;

Left Join (Table1)

Load Product, Department;

SQL Select * from <Table3>;

Option 2

Table1:

Load Reference_No , Ac_No, Product;

SQL SELECT * FROM <TABLE1>;

Table2:

Load Ac_No, Department;

SQL Select * From <Table2>;

Table3:

Load Product, Department;

SQL Select * from <Table3>;


QlikView it will automatically join table

balasundaram
Contributor II

Re: How to join the tables by three criteria?

Hi,

If there is a common field between two tables , associations automatically will happen.

Other wise Join  function we should use for to get two tables into single table.

or else keep also we can use.

jafari_ervin
Contributor II

Re: How to join the tables by three criteria?

please upload your sample qlikview file.

Not applicable

Re: How to join the tables by three criteria?

Dear All,

  It can't be join automatically by normal load.

it has the same Reference_No and I would like to show the customer Ac_No(20611206001101401) belongs to (Account Transfer) Description.First criteria is like below,

In second criteria, there is no Ac_No like(330601017) and it can only join by Product.

Second criteria will be like below,

These above two criteria will be in a single table. After that I can extract the Ac_No belongs to each department. Hope to help me. 

Best Regards,

Kyaw Myo Tun

Community Browser