Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
FleetingImage
Contributor II
Contributor II

Where Exists() not filtering records

I have a  qvd table  that looks like this:

IdkeyAmt
6709661624.19
6709662620
6709663645.13

*It has about 6M records

I want to keep the record with the max(key), so I'm doing as follows:

tbl1:

Load

Id

,key

,Amt

from tbl1.qvd

 

noconcatenate

max_key:

Load

Id

,max(key) as maxKey

Resident tbl1;

 

noconcatenate

tblNoDup:

Load

*

Resident tbl1

where Exists(maxKey, key)

;

drop table tbl1,  max_key;

 

I expect that tblNoDup shows:

IdkeyAmt
6709663645.13

 

But Instead, is returning all three records.  What am I missing?

 

 

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
dilipranjith
Partner
Partner

add a group by to your max load

 

max_key:

Load

Id

,max(key) as maxKey

Resident tbl1 group by Id;

View solution in original post

1 Reply
dilipranjith
Partner
Partner

add a group by to your max load

 

max_key:

Load

Id

,max(key) as maxKey

Resident tbl1 group by Id;

View solution in original post