Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
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

2 Replies
swuehl
MVP
MVP

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
MVP
MVP

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);