Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Autonumber - Help

Hi,

I am trying to create an autonumber that groups by a reference and date.  Howerver I want to to go backwards.

Current Result:

RefAmountDateCount
ABC10001/01/20121
ABC10001/01/20132
ABC15001/01/20143
BCD20015/01/20131
BCD22515/01/20142
CDE30020/01/20141
DEF30006/04/20121
DEF27506/04/20132
EFG20008/08/20131
FGH22510/12/20131

Result Needed:

RefAmountDateCount
ABC10001/01/20123
ABC10001/01/20132
ABC15001/01/20141
BCD20015/01/20132
BCD22515/01/20141
CDE30020/01/20141
DEF30006/04/20122
DEF27506/04/20131
EFG20008/08/20131
FGH22510/12/20131

Essesntially I am trying to identify the most current line of data attached to a reference.  My view is that if I can get this to work in the load script I can then just use a where statement to select everything that has count = 1.

I have been looking through the forums and I am struggling to find anything that I can get to work.

If anyone can help or point be in the right direction I would eb very grateful.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

All you need to do is sort by Date in descending order:

TEST2:

LOAD

Ref,

Amount,

Date,

AutoNumber(recno(),Ref) as Count

RESIDENT TEST

ORDER BY Ref, Date desc;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

All you need to do is sort by Date in descending order:

TEST2:

LOAD

Ref,

Amount,

Date,

AutoNumber(recno(),Ref) as Count

RESIDENT TEST

ORDER BY Ref, Date desc;


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks so much for this.......I feel quite stupid for not knowing that.

Cheers

Badzreyes00
Contributor III
Contributor III

Hi,

This solution works perfectly! however, is it expected that the reload time will become significantly affected? before I applied this I load the sections I needed for less than 5mins but after applying this it took almost 40mins. So I was wondering if there is an alternative solution now? Thank you so much!