Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nilesh_gangurde
Partner - Specialist
Partner - Specialist

How to pick up common values from two different tables

Heyyy ,

        I have two tables with the common field.

        How can i pick up the values from one of the field which are common in first table  and second table's Fields value.

         

        Thanks in Advance.

Regards,

Nilesh Gangurde

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Nilesh,

Do you want to do that in the load script or in a expression? The former can be done using the ApplyMap() or Exists() function:

Table1:

LOAD *

FROM File1.qvd (qvd);

Table2:

LOAD *,

     If(Exists(FieldInTable1, FieldInTable2), 1, 0) AS ExistsInTable1

FROM File2.qvd (qvd)

The latter using a set analysis based on a new field created in the load script

Table1:

LOAD *,

     1 AS Source

FROM File1.qvd (qvd);

Table2:

LOAD *,

     2 AS Source

FROM File2.qvd (qvd);

The expression in a chart:

Count({< Source = {1, 2} >} NameOfField)

Hope that gives you the idea.

Miguel

View solution in original post

3 Replies
Anonymous
Not applicable

hi

yo can do like this

table1:

load:

'table 1' as table

field1

field2

from yourdatabase;

table2:

load

'table 2' as table

field1

field2

from tourdatabase

then u can select fron field table

Miguel_Angel_Baeyens

Hi Nilesh,

Do you want to do that in the load script or in a expression? The former can be done using the ApplyMap() or Exists() function:

Table1:

LOAD *

FROM File1.qvd (qvd);

Table2:

LOAD *,

     If(Exists(FieldInTable1, FieldInTable2), 1, 0) AS ExistsInTable1

FROM File2.qvd (qvd)

The latter using a set analysis based on a new field created in the load script

Table1:

LOAD *,

     1 AS Source

FROM File1.qvd (qvd);

Table2:

LOAD *,

     2 AS Source

FROM File2.qvd (qvd);

The expression in a chart:

Count({< Source = {1, 2} >} NameOfField)

Hope that gives you the idea.

Miguel

nilesh_gangurde
Partner - Specialist
Partner - Specialist
Author

Thanks alfasierra For help And Special Thanks to  Miguel, It works !!