Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to apply Where clause after multiple left join ?

Hi,

I am new to qlikview.

I have below questions.

How we can apply to Where caluse to entire results ?

I want to apply where caluse to the results we get after multiple joins ..

Example :

Noconcatanate:

Test:

LOAD *

          Resident Table1:   <---1000 records

Left Join

LOAD *

          Resident Table2;   <---300 records

Left Join

LOAD *

          Resident Table3    <---Total 200 records among that 100 records has field 'abc'

Where Table3.field = 'abc'

so, end results , i was expecting to be 100 records ,

but, still getting 1000 records.

it looks like WHERE clause is applying to Table3 only and due to left join,

it returns 1000 reords and WHERE condition is not considering.

basically,

I want to apply that WEHRE clause entire results.

2 Replies
Anonymous
Not applicable
Author

Use inner join:

Test:

LOAD *

          Resident Table1:   <---1000 records

Left Join (Test)

LOAD *

          Resident Table2;   <---300 records

Inner Join (Test)

LOAD *

          Resident Table3    <---Total 200 records among that 100 records has field 'abc'

Where Table3.field = 'abc'

jpapador
Partner - Specialist
Partner - Specialist

You could also try storing (or a resident load) the table after you've completed the joins:

Noconcatanate:

Test:

LOAD *

          Resident Table1:   <---1000 records

Left Join

LOAD *

          Resident Table2;   <---300 records

Left Join

LOAD *

          Resident Table3    <---Total 200 records among that 100 records has field 'abc'

Where Table3.field = 'abc'

Test2:

Noconcatenate LOAD *

Resident Test

Where Field = 'abc'

Drop Table Test;