Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
rebelfox
Creator
Creator

Toggle Select Condition Across Two Tables

I am loading two tables into my QlikView Report.

Table 1 is a table of Goods Received positions.  Each position has the identity code of the person who performed the goods receipt.

Table 2 is a table of purchase order positions that auto-joins to the Goods received table on purchase order and position.

Again each position has the code of the person who raised the position as a purchase order.

I want to be able to limit the displayed data in a Chart/Straight Table to just the rows where Table1.PersonCode = Table2.PersonCode

by clicking a button or making a listbox selection but I can't see how to do it without joining the two tables into one and loading the joined table with an 'IF' condition on the load to build an indicator field for selection - which seems poor.

Any ideas?

1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Without seeing sample data, it is a bit difficult. However, I will give a try:

Maybe create two other tables:

[Person Universe]:

LOAD

    PersonCode,

    'Table1' As Source

Resident [Table 1];

LOAD

    PersonCode,

    'Table2' As Source

Resident [Table 2];

NoConcatenate

LOAD

  If(PersonCode = Previous(PersonCode) and Source <> Previous(Source), 'Exist in ' & Source & '|' & Previous(Source)) As Flag,

  PersonCode

Resident [Person Universe]

Order By PersonCode, Source;

Drop Table [Person Universe];

Hopefully, Flag field can indicate those persons who are in both tables.

View solution in original post

3 Replies
sinanozdemir
Specialist III
Specialist III

Without seeing sample data, it is a bit difficult. However, I will give a try:

Maybe create two other tables:

[Person Universe]:

LOAD

    PersonCode,

    'Table1' As Source

Resident [Table 1];

LOAD

    PersonCode,

    'Table2' As Source

Resident [Table 2];

NoConcatenate

LOAD

  If(PersonCode = Previous(PersonCode) and Source <> Previous(Source), 'Exist in ' & Source & '|' & Previous(Source)) As Flag,

  PersonCode

Resident [Person Universe]

Order By PersonCode, Source;

Drop Table [Person Universe];

Hopefully, Flag field can indicate those persons who are in both tables.

Anonymous
Not applicable

May be some data sample would help us to solve your issue. please let us know if Sinan's solution solved your purpose.

rebelfox
Creator
Creator
Author

Pretty much what I was trying to avoid but had to go with it as I can't figure an alternative way.