Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join issue!!!!

Hi All

can any one help me to to find the id records which are having  status value as   top and bottom.  in front end with an expression.

1 Solution

Accepted Solutions
its_anandrjs

In your load script you can map the table1 also for table2 see the load script for that

Table1:

Mapping

Load * Inline [

id,AStatus

1,top

2,bottom

3,top ];

Table2:

LOAD if(ApplyMap('Table1',id) <> BStatus,ApplyMap('Table1',id,'unknown'),'EqualString') as AStatus,BStatus,id;

Load * Inline [

id,BStatus

1,top

1,bottom

2,bottom

2,top

3,top

];

And then in the Straight table take

Dimension1:- AStatus

Dimension2:- BStatus

Expression:- Sum({<AStatus = {'bottom','top'}>} id)

View solution in original post

8 Replies
tresesco
MVP
MVP

In a text box try like:

=Concat( Distinct {<Status={'top', 'Bottom'}>} ID, ',')

Not applicable
Author

Hi Tresesco   i would like to apply this expression on 300,000 records. in a straight table.

tresesco
MVP
MVP

What would be your dimension? Could you post a sample qvw?

Not applicable
Author

I have two tables A,B

A   having

id    Status

1       top

2     bottom

3     top

B is having

id    Status

1       top

1      bottom

2     bottom

2     top

3     top

now i applied inner join   so i got      id   Astatus     Bstatus

                                                     1       top        top

                                                     1       top        bottom

                                                      2      bottom    bottom

                                                      2      bottom    top

                                                       3      top         top

now can you show the  records   the   records having    id   Astatus   Bstatus

                                                                                1     top         bottom

                                                                                 2    bottom    top

in straight table.

Thank you.

tresesco
MVP
MVP

PFA

anbu1984
Master III
Master III

In Script

TabA:

Load * Inline [

id,AStatus

1,top

2,bottom

3,top ];

Inner Join(TabA)

TabB:

Load * Inline [

id,BStatus

1,top

1,bottom

2,bottom

2,top

3,top ];

Final:

NoConcatenate

Load * Resident TabA Where AStatus <> BStatus;

Drop table TabA;

In Front end

Not applicable
Author

Thank you.

its_anandrjs

In your load script you can map the table1 also for table2 see the load script for that

Table1:

Mapping

Load * Inline [

id,AStatus

1,top

2,bottom

3,top ];

Table2:

LOAD if(ApplyMap('Table1',id) <> BStatus,ApplyMap('Table1',id,'unknown'),'EqualString') as AStatus,BStatus,id;

Load * Inline [

id,BStatus

1,top

1,bottom

2,bottom

2,top

3,top

];

And then in the Straight table take

Dimension1:- AStatus

Dimension2:- BStatus

Expression:- Sum({<AStatus = {'bottom','top'}>} id)