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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count the record

Hi Qlikview team

I have load the below tables and written below script. i have to keep my duplicates in tables.

when i count the record it  shows 6 but i load 9 records. when i apply left join with distinct keyword records reduced in main table why.

    

ACCTBA or SEPCGRPACCT
00203300002M00P17542033
0014100000GRP 1410
0014101500GRP 1410
0014101200GRP 1410
0014101200GRP 1410
0014102600GRP 1410
0014102600GRP 1410
0024309000GRP 2430
0024309000GRP 2430

Tab:

LOAD

     '201601' as FiscalYrMth,

     ACCT,

     [BA or SE],

     PC,

     GRPACCT,

     Location  

FROM

(ooxml, embedded labels, table is Sheet1);

Left Join

LOAD

Distinct

FiscalYrMth,

FiscalYrMth as RecID

Resident Tab;

regards

Ramu

Labels (1)
2 Replies
swuehl
Champion III
Champion III

The DISTINCT predicate will apply also to JOINed and CONCATENATEd tables, i.e. it will be kept as a property of the resident table, that's a Qlik speciality.

swuehl
Champion III
Champion III

Try instead a WHERE NOT EXISTS() clause:

Tab:

LOAD

     '201601' as FiscalYrMth,

     ACCT,

     [BA or SE],

     PC,

     GRPACCT,

     Location  

FROM

(ooxml, embedded labels, table is Sheet1);

LEFT JOIN

LOAD

FiscalYrMth,

FiscalYrMth as RecID

Resident Tab

WHERE NOT EXISTS(RecID, FiscalYrMth);