Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
miskas3
Contributor
Contributor

Help in a script

Hello everyone, Im a begineer in qlikview. I have 2 tables, in the table 1 I have Policy ID and two different endorsement IDs, in the other table I have Policy ID and just one endorsement ID. How can I search for the policies that are in the table 1 but aren’t in the table 2. Using the combinations of Policy and enforsement.

Thanks!!

Labels (1)
1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

Welcome to the QlikView community!

The answer to your question depends on the details - where do you need to "search" for these policies? In the script? In the layout? 

If you need this in the script, then you could load your two tables, adding a new combined field in table 2, and then reload data from table 1, with the condition that the combination of the two fields doesn't exist in the combo field. Something along these lines:

Table1:

LOAD

     PolicyID,

     ID1,

     ID2

FROM ...

;

Table2:

LOAD

     PolicyID,

     ID1,

     PolicyID & '|' & ID1    AS  ComboTest

from...

;

Table3:

LOAD

     *

FROM 

     Table1

WHERE

     Not Exists(ComboTest, PolicyID & '|' & ID1)

;

You will need to take care of renaming or dropping some of the fields, to avoid synthetic keys and circular references, but this is the direction for you to identify Policies that don't exist in Table 2.

As a new QlikView developer, you could benefit a lot from my book QlikView Your Business - check it out.

Cheers,