Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with sorting/ranking

Status
Not open for further replies.

JornGH

Technical User
Joined
Feb 14, 2003
Messages
3
Location
NO
Take the following table:

Supplier Invoice No. Invoice Date Invoice Amount
A 1 01.01.03 300,-
B 2 02.02.03 200,-
C 3 03.03.03 100,-

Etc. etc. let's say it contains 500 rows.

With the ranking function it's easy to fetch the top 20 Invoice Amounts and sort them by Supplier.

However, I want to first sort these by Invoice Date and display only the 20 most recent ones (Invoice Date is insignificant). In other words I want to rank the table by Invoice Date.

How do I do this?
 
Try this and let us know if it works for you.

Create a variabl, call it DateMeasure that is MEASURE that is simply defined as =<Invoice Date> Now apply your ranking to the original <Invoice Date> object. Make sure you use your new measure as the thing you are ranking. Pick the top 20 and it will display the 20 most recent invoice dates (including ties).

Is this what you're looking for? Steve Krandel
BASE Consulting Group
 
Yes, this works! Thank you very much!
 
> How 'bout a vote for a helpful post?

Done!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top