+ Reply to Thread
Results 1 to 5 of 5

Automatically rank of data basis a field

  1. #1
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    123

    Red face Automatically rank of data basis a field

    Hi,

    In the attached database, column "Rank" is what I am looking for through the query.

    I want "Circle" wise ranking on the "Outages" that means If circle "HP" has 8 records ranking would come from 1-8 for these 8 records and if Circle "JK" has 3 records ranking would come from 1-3 for these 3 records. Rank column would not have ranking from 1-11 rather it would be till 8 for circle "HP" and till 3 for cirlce "JK"

    Ranking would be based on Outges. Lower the outages, higher the ranking and vice versa.

    If ouages were 100, 90, 80 rank would be 3,2,1 respectively.

    Kindly help on this.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Automatically rank of data basis a field

    I have done this with a series of queries and a final union query (query5)

    Alan
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    123

    Re: Automatically rank of data basis a field

    Thanks for the quick response..

    but this does not serve my purpose. I have a large database with about 11 circles and 12 months data for about 10000 sites data.

    If I apply these set of queries to each circle, it will be 11 queries and then a union query. It would be very time consuming. I need a simple and easy solution.

    If there is some other way out, please help me with the same.

    Thanks


    Quote Originally Posted by alansidman View Post
    I have done this with a series of queries and a final union query (query5)

    Alan

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Automatically rank of data basis a field

    I can't envision an easy way for this. Do you need to run the query for all 10000 sites or will it be on an adhoc basis? As to the running for months, I would use a search form that would prompt the user for the particular month to query. Unless it is on an adhoc basis, then I might use a list box on a search form to select the particular sites you would wish to have run.

    I imagine that you could run a loop through the data set employing VBA, but I cannot help you with that--maybe someone with more VBA experience could show you the way.

    Alan
    Last edited by alansidman; 07-09-2011 at 01:45 PM. Reason: Possible VBA solution.

  5. #5
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    123

    Red face Re: Automatically rank of data basis a field

    Thanks for the response.

    There is a little modication to the set of data. Same is attached.(Assets1.Zip)

    What I am looking for is the ranking of sites basis the outages within the cluster.

    KHAGARIA Cluster has 5 sites, hence ranking would be from 1 to 5 within this cluster. similarly, BANKA cluster has 7 sites so ranking from 1-7 should be applicable to sites.
    Likewise, BAGAHA cluster has 10 sites so ranking from 1-10 applicable.

    Ranking basis the outages should be in the same manner as done earliar..

    Lower the outages highest the ranking (10-9-8 etc) and higher the outages, lower the ranking (1,2,3 etc)

    Please help..




    Quote Originally Posted by alansidman View Post
    I can't envision an easy way for this. Do you need to run the query for all 10000 sites or will it be on an adhoc basis? As to the running for months, I would use a search form that would prompt the user for the particular month to query. Unless it is on an adhoc basis, then I might use a list box on a search form to select the particular sites you would wish to have run.

    I imagine that you could run a loop through the data set employing VBA, but I cannot help you with that--maybe someone with more VBA experience could show you the way.

    Alan
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1