Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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

Highlighted

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
Highlighted
MVP & Luminary
MVP & Luminary

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.

Highlighted
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;

Highlighted
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
Highlighted
Champion
Champion

Highlighted
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