Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI expert,
I have data in a table and I have to exclude the data from table 1 based on data that us provided in an excel.
example:
table1:
POLICY_NO | CUSTOMER |
---|---|
123 | A |
4567 | B |
789 | C |
excel was table consider to exclude
POLICY_NO | CUSTOMER | REMARKS |
---|---|---|
789 | C | NOT INTRESTED |
731 | D | CLOSED |
123 | A | SUSPENDED |
>>if i do residen load I have to use group by
Only if you have aggregate functions like sum/count/max...
If are just reloading to apply a filter, there is no need for a group by.
TRY THIS:
TO_EXCLUDE:
LOAD POLICY_NO&'_'&CUSTOMER AS KEY,
POLICY_NO,
CUSTOMER,
REMARKS
FROM
[https://community.qlik.com/thread/316649]
(html, codepage is 1252, embedded labels, table is @2);
LOAD concat(chr(39)& KEY& chr(39),',') as EXCLUDE_RECORDS
RESIDENT TO_EXCLUDE;
Let vEXCLUDE = fieldvalue('EXCLUDE_RECORDS',1);
DROP Table TO_EXCLUDE;
DROP Field EXCLUDE_RECORDS;
MYRECORDS:
LOAD
POLICY_NO&'_'&CUSTOMER AS KEY,
POLICY_NO,
CUSTOMER
FROM
[https://community.qlik.com/thread/316649]
(html, codepage is 1252, embedded labels, table is @1)
Where NOT WildMatch(POLICY_NO&'_'&CUSTOMER,$(vEXCLUDE));