Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the values from 2 different tables

  T1:  

PRFIDACIDTime stamp
100111/10/2013
100211/11/2013
100311/12/2013
100411/13/2014

T2:

 

   

ACIDText
3Comment

 

when am trying to display the latest record by using above tables got the output like below:

  Output:  

PRFIDACIDTime stampText
100411/13/2014-

but the expected result is:

all the values will be showm for the  PRFID from two tables.

PRFIDACIDTime stampText
100411/13/2014Comment
7 Replies
krishnacbe
Partner
Partner

Hi

Two tables are concatenated using the field ACID and a Outer join will be created.

Can you share a sample app with some more data. whether for all the ACID the text should be Comment?

Regards

Krishnapriya

jonathandienst

The Text field in T2 associates with line 3 in T1.

Do you want the Text field in T2 to associate with all lines that contain the same PRFID as line 3?

Then you need to discard ACID in T2 and fetch the PRFID. Something like this when loading T2:

T2:

LOAD ACID, Text

From ....

Left Join (T2)

LOAD Distinct ACID, PRFID

Resident T1;

DROP Field ACID From T2;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagan
Luminary Alumni
Luminary Alumni

Hi,

When you join the tables based on ACID you won't get Text as comment for 4, because you have the comment only for ACID 4.

If you want the same text for all the rows then try like below

T1:

PRFIDACIDTime stamp
100111/10/2013
100211/11/2013
100311/12/2013
100411/13/2014

T1:

LOAD

PRFID,

ACID,

TimeStamp

FROM DataSource1;

LEFT JOIN(T1)

LOAD

Text

FROm DataSource2;

Regards,

jagan.

anat
Creator
Creator

Hi Jagan ,

as per your answer ,how join will work ?without any common column in both tables.

T1:

LOAD

PRFID,

ACID,

TimeStamp

FROM DataSource1;

LEFT JOIN(T1)

LOAD

Text

FROm DataSource2;

anat
Creator
Creator

Hi cena,,

this is what your looking for output or something different?

 

PRFIDACIDTime stampText
100111-10-13Comment
100211-11-13Comment
100311-12-13Comment
100411/13/2014Comment
balrajahlawat
Champion
Champion

sanketkhunte
Creator II
Creator II

How are you loading these two tables ? I mean ,which join / Concatenate  are you using in Script ?

If you can share your script that will be helpful to solve this issue..

Many Thanks

Sanket