Ranking / Top 10 Under Multiple Categories

Sep 18, 2007

In a table I have:

- Category (A, B, C)
- Family (A1, A2, A3, B1, B2, etc)
- Item
- Sales

I'm looking for a way to get the top 10 items in each category + family based on sales (ie: top 10 in A-A1, then A-A2, then A-A3, etc). When I try using the top function, it doesn't treat each category + family combination as unique. Any ideas?

View Replies


ADVERTISEMENT

Multiple Categories

Aug 9, 2006

Hi guys,

I am implementing a new database (Access 2000) for my company.

It contains contact details of a subscription base.

Four tables are present MEMBER, ORGANISATION, EVENTS and CATEGORY.

My problem is; people attend events, and i want to record this in the database. Each event has an event ID field, and an event description field.

When recording the events which people attend, i could just use the event ID field, but problem is that people can obviously attend more than one event..

Also;

People belong to a certain category

Again i have a category ID field, but people can belong to more than one category.

Any ideas on how to record this info??

View 4 Replies View Related

One Record Multiple Categories

Jan 20, 2005

Hi

I've built a contacts database which consists of one table containing contacts and services provided and a table with a list of categories, each has a PK autonumber id field. My problem is that individual contacts could fall into multiple categories, could somebody tell me how to do this.

Many Thanks
Anita

View 5 Replies View Related

Company Db With Multiple Product Categories

Jul 12, 2005

Hi!

I need to create a database of the info of a few hundred companies. Each company (food producers) specializes in various product categories, not just one. This is my problem/question: each company entry should then have a possibility to have as many product categories as needed. How can I do this without using "free text" fields? The website user should obviously also be able to search the db - by clicking checkboxes with the categories maybe?

(+Also: When the admin user needs to add the info of a new company (with, say, 9 product types) into the database, what kind of an SQL clause I need to INSERT INTO the db? For example if the product categories where laid out as checkboxes, and the user would just click the ones he wants.)

View 8 Replies View Related

Tables :: Query Off Of A Junction Table - Multiple Categories

Sep 26, 2013

So I have a form that has a sub form on it (based off of a junction table), indicating which category a particular project belongs to. It can belong to multiple categories:

ProjectID
100
Category
Admin
Finance

But I want to run a query to find all of the projects that are both admin and finance. When I do that now, it comes up as two separate records in the query, which is fine... but I have to know the projects before hand to find if it's in both, because it returns heaps of records, anything that says admin or finance... and that defeats the whole purpose. I want the query to show me JUST the projects that have both of those in their subform..

View 14 Replies View Related

Tables :: Structuring Categories And Sub Categories

Dec 27, 2012

Suppose I receive boxes and store them in a room. Each box can contain items that are either shaped as cubes or spheres and I have to allow for the addition of more shapes in the future, but only one shape can be in each box. Each box contains a random number of shapes and two boxes may, or may not, contain the same number of shapes as another.Cubes can be either Red or Green, Spheres can be either Blue or Yellow.

I wish to set, and have the ability to change, how many cubes and how many spheres, on a percentage basis, I wish to have (e.g., 60% Cubes and 40% spheres).I also wish to set, and have the ability to change, what percentage of cubes I want to be Red and Green and which percentage of Spheres I wish to be Blue and Yellow (e.g., Cubes -Red 70%, Yellow 30% )

e.g. -- I have several boxes totaling:

Cubes
Red 30
Green 40

Spheres
Blue 10
Yellow 20

My goal is to produce three reports.The first report would provide the Target and Actual number of Cubes and Spheres expressed as a Value and %. The #'s would simply be calculated from my desired % . So, if I wanted to have 60% cubes and I had 100 Shapes, my target # would be 60. If I had 200 Shapes it would be 120. (i.e., The actual number of shapes I have is simply a factor of how many I receive and I have no control over this.)

The First Report would look like this

Target % - Actual % - Target # - Actual #

Cubes 60% 70% 60 70
Spheres 40% 30% 40 30

The second and third reports would be the same format but would break down cubes into red and green and spheres into blue and yellow.I can accomplish the Report that breaks down the shapes but I am running into problems with the next level as I need the total number of shapes and the the total number of only Cubes or Spheres to insert into the expressions.

View 2 Replies View Related

Ranking

Sep 27, 2005

I've got a football table ranked by Points and Goal Difference:

e.g.

Team Pts Goal Diff
C 4 +2
A 4 +1
B 0 -3

and I want to introduce another field automatically (in a query) which gives the position of each team:

Pos Team Pts Goal Diff
1 C 4 +2
2 A 4 +1
3 B 0 -3

Can anyone help?

Thanks a lot

Jimbob

View 7 Replies View Related

Ranking

Jul 4, 2006

Could any one tell me how to change the ranking of a field from 1,2,3,4,5,6,....1000 to 1st,2nd,3rd,4th.5th.6th........1000th.

Nested if could only give upto 15, and another method that is i used worked but made the query to run too slow.

tHANKS

View 3 Replies View Related

Ranking

Apr 9, 2008

I have a simple query which lists names and next to each name is a sum of sales. I have sorted this sum field decending and now I need to add a third column in the query which ranks these.

Process Name: Sum of Variation: Rank
Process A 100 1
Process B 98 2
Process C 65 3
Process D 52 4

I am a beginner in access and am unsure how to automatically create the rank field.

View 7 Replies View Related

Categories And Sub-categories

Jan 23, 2005

Hi,

I'm very new to Access, having used it for the first time today :)

I've got a database to write for a media database as a learning example and I've run into my first real problem...

I've got a table for users and I've got to allow users to be able to own one or more media types, e.g. CD, DVD, video, record, etc. Of these types, there are sub-categories for most of them. For example, a DVD may be a horror film, action film or music video, and a CD may be hip-hop, rock or blues, etc.

I thought I could have a reference data table containing a category ID and category value, together with a reference data category table which simply listed the categories. This would work fine if a user could only have one type of media but of course they can have several. So, I thought about having a "composite category" instead which would contain a category, whether it contained a sub-category and a sub-category ID. I'm trying to get my head round this and wondered if this must surely be a fairly common issue to solve. Does anyone know of any pointers or any examples I could do with looking at?

Sorry if I haven't explained it too well :o

View 2 Replies View Related

Categories

Oct 28, 2005

Okay here is my silly little issue, my boss decided to add sub categories, just when I get the database set-up.
Table 1
Category
Category_ID
Category_Name

Table 2
Sub_Category
SUb_Category_Name

Table 3
Contacts
Company
Contact
Adress
Ect Ect

I would like to be able to have each contact grouped by category, then sub category..but I am not sure how to get the relationship to work.

View 2 Replies View Related

Ranking Data

Feb 12, 2007

Is there a way to write a formula in an Access query that would stack rank a group of numbers or dates in a field? I have a set of order dates and i want to rank by the most recent one. Being the recent orders in the top 20%.

If orderdate is in the top 20%, return a 5.
If Orderdate is in the next 20%, return a 4.
If Orderdate is in the next 20%, return a 3.
If orderdate is in the next 20%, return a 2.
Then the remaining numbers, return a 1

View 2 Replies View Related

Ranking Query

Apr 3, 2007

I've found a few similar posts to this, but nothing exactly answers what I need.

I'm using the following query to get a list of the top five salesmen, based on the number of customers per salesman, per month. I've added a rankings field, based on a query I found here on the forum

SELECT TOP 5 [SalesResults_1].CurrMonthClients,
(SELECT count(*) FROM [SalesResults]
WHERE
[SalesResults].[CurrMonthClients] >=
[SalesResults_1].CurrMonthClients;) AS Rank,
[SalesResults_1].SPName
FROM
[SalesResults] AS [SalesResults_1]
ORDER BY
[SalesResults_1].CurrMonthClients DESC;"


This works perfectly, with one exception.
If two salesmen have the same number of clients and both are the joint highest, their rank is displayed as 2, rather than the desired 1.

Can anyone spot some simple change to the query that would take this eventuality into account?

Thanks in advance.

View 4 Replies View Related

Ranking In A Listbox

Jul 27, 2006

I have a list box that stores the project names in a Form. The user wants to have the ability to order the project in a way they want. And the report need to present this order in the same way. In other word, user wants to move the proejcts around in the listbox.

Could anyone give a hand? Thank you.

View 4 Replies View Related

How To Run A Subtotal And Ranking Query

May 27, 2005

Have a table containing a column called "BOC" (Budget Object Code) that contains approximately 85 different 4 digit codes, with one selected for each row. (See sample below). Table has 30,000 rows of data. What I need to do is run a query that will give me a subtotal dollar amount for each unique BOC, and then display the results in descending order for both Obligations and Expenditures. Any ideas??

Sample Data:

COST CENTER BOC OBLIGATIONS EXPENDITURES
119900 2670 1000.00 500.00
119901 2685 2000.00 1000.00
119999 2670 5000.00 2000.00
119920 3130 5000.00 5000.00

View 1 Replies View Related

Record Ranking By RecordNumber? Please Help

Sep 15, 2005

Is there a way to update a field in a sorted query with its recordnumber value, as if to assign a rank to it?

Example Table contains Name, Grade, Rank sorted by Grade ASC

Record 1: John, A, *Update here*
Record 2: Tony, C, *Update here*
Record 3: Eric, D, *Update here*

The *Update here* is the bit that I need to update with each records recordnumber, so that the end result would be as follows:

Record 1: John, A, 1
Record 2: Tony, C, 2
Record 3: Eric, D, 3

Can anyone please help?

Thank,

Steve Johnson

View 3 Replies View Related

Question On Ranking And Autonumbers (I Think)

Jan 12, 2007

Hello All

Firstly I have been reading this forum for a while picking up hints and tips and am very grateful so big grats and thanks to all you guys for the help

The problem I am stuck on at the moment will hopfully be quite simple, but I should point out I have absolutely no skill or knowlede in Modules and VB language I most of my "stuff" via statements within the Design view.

Ok so here we go. I have a query which brings back the top 50 performing sales items, which is done by sorting them in descending order and using that filter thing at the top of the design view, which is set to 50. What I would like to do is insert a field in the query which gives the rank, so the best seller is given number 1, the second best 2 and so on and so forth.

Sorry if there is a topic already, I have tried to search, but couldnt find what I was looking for.

Ta in advance for any help

Mav

View 4 Replies View Related

Priority Ranking Adjustments

Feb 28, 2008

I found this from different fourm by searching google. This is exactly what I need to do and the answer was given; however, I can't figure it out. Can someone please post a step by step instruction on how to complete the following.

Thank you!


Question

I have a datbase full of projects that must be ranked in priority order. This was simple enough but when I add a project I will likely need to change the priority rank of all the "lesser" projects. With over 500 projects adding a new project with a rank of 50 means changing all the ranks 50 and above. I want to be able to add a project and when I determine its rank I insert the rank number and every rank equal to the project just added is the indexed by 1 digit. No two project can be ranks the same, one is always more important than another.


Answer

Create an update query that sets the priority field to:

[Priority] + 1

then set the criteria to

>= new number

Where new number is the rank of the new number.

This will increment by one each priority.

Hope this helps,
Scott<>

View 5 Replies View Related

Qualification Ranking Query???

Oct 17, 2006

I am trying to build a report that will rank employees, based on their qualifications for a promotion to a specific position. I need to build one that will work for every position in the organization, based on the requirements for the specific position. I know this is vague, but before I go into a long explanation, can anyone tell me if this is even possible in Access?? Thank you!!

KellyJo

View 1 Replies View Related

Subjective Ranking Within Array

Aug 12, 2015

I reviewed a few ways to rank based on calculations and use them, however what I'm looking to accomplish is subjective ranking whilst limited the ranks to the total number of records in the recordset.

e.g. you have 50 records. Manually moving Record # 30 up to #3 would bump the existing records #3 to #29 down one (to #'s 4 through 30) and records >30 would stay the same.

Would deploy this to the end users within a continuous form, each row having Up/Down arrows to move each record up/down 1 rank as well as provide a combo box so they may choose any value within the array they want to set it to...

View 14 Replies View Related

Ranking According To Student Average

Apr 13, 2013

I want to prepare a query which gives me the ranking of the classroom according to their average. (also there are classrooms in the table, if possible, query should consider the grades) you can see the attached sample document..

View 1 Replies View Related

Newbie - Categories

Jan 3, 2007

Hi,

I am working on a database to list all the inkjet cartridges we sell. Within the printer table, I want to list which category they are on our website. For example, Epson C20 Printer would be in Ink & Toner > Epson > Inkjet > Stylus C & CX Series.

I what some way to enter these in a number of fields, say Cat1, Cat2 etc. I havent a cluw what would be the best way to do this? Has anyone got any ideas? I am thinking about some kind of drill down but wouldnt know where to start on this. Any help would be gratefully received?

Cheers

J

View 3 Replies View Related

Categories And Subcategories

Apr 1, 2005

I'm wondering how to design an Access database with the same type of structure as "Yahoo Shopping!". The Yahoo site allows search for women's clothing or men's clothing or all clothing...please explain how the relationships are structured.

Is it just one category table with queries that display results of a search of multiple categories? How do I structure it in Access queries and forms?

Thank you!

View 5 Replies View Related

Advanced Ranking Query Options…

May 23, 2005

I have been developing a website where users enter details about positions that they would like to fill.
Other users enter details of positions that are available.
I currently run a ranking query for users that matches from the options they enter which positions best match their profile in a ranked order.

I'm using an Access Database and ASP.
The query is taking a very long time to run.

This is how I have the query built at the moment.


Code:strSQL = "SELECT qryApplicant.* FROM qryApplicant WHERE (((qryApplicant. ApplicantRID) & ''='" & applicantRef & "'));" call getFromDatabase(strSQL, objTempRS, currentPage) if not objTempRS.EOF then applicantWants = True applicantGender = objTempRS.Fields("ApplicantGender") applicantAge = objTempRS.Fields("ApplicantAge") applicantBSMinDuration= objTempRS.Fields("ApplicantBSMinDuration") applicantBSMaxDuration= objTempRS.Fields("ApplicantBSMaxDuration") applicantBSEarlyDate= objTempRS.Fields("ApplicantBSEarlyDate") applicantBSLateDate= objTempRS.Fields("ApplicantBSLateDate") applicantLanguage= objTempRS.Fields("ApplicantLanguage") applicantPosition= objTempRS.Fields("ApplicantPosition") applicantPositionType= objTempRS.Fields("ApplicantPositionType") applicantNationality= objTempRS.Fields("ApplicantNationality") end if if applicantWants then applicantPoss = 0 lineTemp = "" strSQL = "" strSQL = strSQL & "SELECT " & applicantRef & " AS ApplicantRef" strSQL = strSQL & ", qryEmployer.EmployerRID" ' ****************************** Check Gender ****************************** if applicantGender & "" <> "" then lineTemp = lineTemp & "(IIf(([EmployerCSGender]='any'),50,(IIf(([EmployerCSGender]='" & applicantGender & "'),50,1))))" else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 50 ' ****************************** Check CheckAge ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if isNumeric(applicantAge) then lineTemp = lineTemp & "IIf(([EmployerCSMinAge]<=" & applicantAge & "),IIf(([EmployerCSMaxAge]>=" & applicantAge & "),20,0),0)" else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check CheckMinMaxDuration ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if isNumeric(applicantBSMinDuration) then if isNumeric(applicantBSMaxDuration) then lineTemp = lineTemp & "IIf(([EmployerCSMinDuration]<=" & applicantBSMaxDuration & "),IIf(([EmployerCSMaxDuration]>=" & applicantBSMinDuration & "),20,0),0)" else lineTemp = lineTemp & "IIf(([EmployerCSMaxDuration]>=" & applicantBSMinDuration & "),20,0" end if else if isNumeric(applicantBSMaxDuration) then lineTemp = lineTemp & "IIf(([EmployerCSMinDuration]<=" & applicantBSMaxDuration & "),20,0" else lineTemp = lineTemp & "(20)" end if end if applicantPoss = applicantPoss + 20 ' ****************************** Check CheckEarlyLateDuration ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if (applicantBSEarlyDate & "" <> "") then if (applicantBSLateDate & "" <> "") then lineTemp = lineTemp & "(IIf([EmployerCSLateDate]&''<>'',(IIf(([EmployerCSLateDate])>=" & DATE_DELIMITER & AusDate(applicantBSEarlyDate) & DATE_DELIMITER & ",(IIf([EmployerCSEarlyDate]&''<>'',(IIf(([EmployerCSEarlyDate])<=" & DATE_DELIMITER & AusDate(applicantBSLateDate) & DATE_DELIMITER & ",20,0)),0)),0)),0))" else lineTemp = lineTemp & "(IIf([EmployerCSEarlyDate]&''<>'',(IIf(([EmployerCSEarlyDate])<=" & DATE_DELIMITER & AusDate(applicantBSLateDate) & DATE_DELIMITER & ",20,0)),0))" end if else if (applicantBSLateDate & "" <> "") then lineTemp = lineTemp & "(IIf([EmployerCSLateDate]&''<>'',(IIf(([EmployerCSLateDate])>=" & DATE_DELIMITER & AusDate(applicantBSEarlyDate) & DATE_DELIMITER & ",20,0)),0))" else lineTemp = lineTemp & "(20)" end if end if applicantPoss = applicantPoss + 20 ' ****************************** Check Language ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantLanguage & "" <> "" then getMultiValues applicantLanguage, ":", arrSplit01, arrSplit01Max itemTemp = "0" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerLanguage] Like '%" & Left(arrSplit01(intCounter01),3) & "_%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check Nationality ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantNationality & "" <> "" then getMultiValues applicantNationality, ":", arrSplit01, arrSplit01Max itemTemp = "0" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerNationality] Like '%" & arrSplit01(intCounter01) & ":%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check Position ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantPosition & "" <> "" then itemTemp = "" getMultiValues applicantPosition, ":", arrSplit01, arrSplit01Max itemTemp = "0" if instr(applicantPosition,"ANY") then itemTemp = "(10)" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then if arrSplit01(intCounter01) <> "ANY" then itemTemp = "(IIf(([EmployerPosition] Like '%" & Left(arrSplit01(intCounter01),3) & "_%'),20," & itemTemp & "))" end if end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check PositionType ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantPositionType & "" <> "" then getMultiValues applicantPositionType, ":", arrSplit01, arrSplit01Max itemTemp = "0" strType1 = "" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "ANY" then strType1 = "(10)" next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "rea" then strType1 = "(IIf(([EmployerPositionType] Like '%r??:%'),15," & itemTemp & "))" end if next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "coa" then strType1 = "(IIf(([EmployerPositionType] Like '%c??:%'),15," & itemTemp & "))" end if next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerPositionType] Like '%" & arrSplit01(intCounter01) & ":%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 strSQL = strSQL & ", (" & lineTemp & ") AS Total, qryEmployer.EmployerActive, '" & applicantPoss & "' AS Poss, qryEmployer.* FROM qryEmployer " strSQL = strSQL & "WHERE (((qryEmployer.EmployerActive)=True) AND ((qryEmployer.EmployerLastLoginDate)>" & DATE_DELIMITER & dateAdd("d",(optionDaysListed * -1),now()) & DATE_DELIMITER & ")) " strSQL = strSQL & "ORDER BY (" & lineTemp & ") DESC, qryEmployer.EmployerLastLoginDate DESC;"


Does anyone know any other ways to build this type of Query to show result in a ranked order.

View 1 Replies View Related

Queries :: Ranking Records Within Query

Mar 4, 2014

I'm looking for a way of ranking records within a query. Access doesn't have a Rank formula like in excel ...

View 5 Replies View Related

Record Automatic Ranking On Form

Feb 11, 2012

I have a number of records in my database and I use a form to input information, update fields etc. One of these fields is a ratio. I would like to create another field, in the record, input from the form, that automatically generate the ranking of the record in the database using the ratio, in descending (or ascending) order. So if I have 1000 records, the field would return, right after I update the ratio, which ranking within these 1000 it now holds.

Is this possible? In the event two (or more) records share the same ratio, what happens?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved