Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!!
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,