Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Ranking items in a report

    Our marketing department had me work up a database & report yesterday, but with a twist that I hadn't worked with before. After the records were sorted for the report, they wanted a numerical "Ranking" added to the report.

    All that I was able to work up on short notice was a calculation on the report itself -- [Rank]=count(1)/[count_of_records] -- set to keep a running total over the entire group. The report had 331 records, so this worked out as 331/331 for the first record, 662/331 for the second record, and so on. Whichever way the report was sorted, I got the desired results.

    Though this worked, it seems like an inefficient, round-about way to get a ranking. Is there an easier way?

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ranking items in a report

    No comment about the method, just does this 'ranking' actually mean anything? As you say it dependant on the sorting.

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Ranking items in a report

    The joke is that it doesn't really mean anything. It just assigns a "Ranking" of 1 to the first item listed on the report, 2 to the second, and so on. Essentially, it is just a number series from 1 to whatever running down the left column of the report. No matter what the sort criteria was, these numbers would not change. <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>

    Maybe if these "rankings" were being saved in the database to track changes in position over time... but why save a calculated value anyways??? But at least Marketing is happy. <img src=/S/sarcasm.gif border=0 alt=sarcasm width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •