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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Preceeding Load Problem

Im attemping to Rank DiscountAmounts from my qvd's then load only the top10 in my load script but the Rowno() is not comming through the preceeding load as im expecting.

Any idea what im doing wrong here ?


discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
[\code]</body>
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


colinr wrote:
discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;


Use recno() instead of rowno() and it should work just fine.

-Rob

View solution in original post

4 Replies
Not applicable
Author

Hi Colin,

I think this would work:

discountAmount:
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount

Order by DISCOUNT_AMOUNT desc;

noconcatenate

top10:

Load Rank , DISCOUNT_AMOUNT resident Where Rank <11;

drop table Discount;

drop table discountAmount;

Not applicable
Author

Embarrassed forget a reference to the correct resident table in the second load statement

discountAmount:
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount

Order by DISCOUNT_AMOUNT desc;

noconcatenate

top10:

Load Rank , DISCOUNT_AMOUNT resident discountAmount Where Rank <11;

drop table Discount;

drop table discountAmount;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


colinr wrote:
discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;


Use recno() instead of rowno() and it should work just fine.

-Rob

Not applicable
Author

Cheers That sorted it