Simple Query Problem - Calculating Percentages
Mar 7, 2006
Hi, first post!
Just started doing access at work and have a problem.
I have a database. Each record has a bunch of different fields.
In one field, the record can either be DC or DS (different classifications).
I would like to run a query which would tell me the percentage of DCs and DSs.
I have managed to create a query that counts the total of each one, but for the life of me i cannot figure out how to do the percentages.
Can anyone help?
I am using Access 2000 and my query is being made in design view
The Query has 2 columns:
Column 1
Field: DC/DS
Table: Main
Total: Group By
Show: yes
Column 2
Field: DC/DS
Table: Main
Total: Count
Show: Yes
Can I add the percentage section as another column (using an expression?) or will it have to be another query, that runs the above query then uses data from that?
Thanks, Craig
View Replies
ADVERTISEMENT
May 6, 2013
I am currently using Access 2007 and have created a huge database for our investment managers to calculate the income based on percentages. The percentages are created in Excel. I have uploaded into the database both the June and the July percentages. When I run the query for my report using the date range for June, it works fine. When I request just the July information (entering the date range for July) the June data is doubled on the report.
View 4 Replies
View Related
Apr 20, 2006
Hey guys.
I have a boolean expression which I want to calculate the percentage of.
I have the field 'Regular Booking' which is either true or false. I have 6 true and 5 false, equalling to 11 in total. I've tried using: 100*[CountOfRegular Booking] / [TotalRegular Booking] but this gives me the same percentage for both true and false. So if I enter 5 I get 45.54% for both true and false... why is this? I've had trouble with this for ages now and I'm pulling my hair out, lol. :(
Thanks guys!
View 13 Replies
View Related
Aug 10, 2015
I am using following function to return percentage spend by testing against number of months elapsed. I am unable to show the CSpend as percentages and I cannot seem to get the percentages in the query.
Public Function CSpend(mMonths)
If (mMonths) = -4 Then
CSpend = 1
ElseIf (mMonths) = -3 Then
CSpend = 0.99956
ElseIf (mMonths) = -2 Then
[code]....
View 4 Replies
View Related
Apr 7, 2006
Simple question: how do you convert vlaues into percentages?
I have a boolean expression so when it's ticked the bookings are regular, and if they're false they are occasional bookings. I have used 10 bookings as test data (5 regular - true, 5 occasional - false). How would I convert these into percentages? For example, I've used the "Count" total to fint the number of regular and occasional booknigs, which are both 5. This is 50%, but how would I do that? Thanks for your help guys. :)
View 2 Replies
View Related
May 4, 2006
hey there i need help :)
ok, so i have to work out week by week percentage uses
i have a query that already finds the bookings in the week already, that works fine, but then i need to find the % use for that week, which is the count of the number of bookings in the week / 21
ive tried doing this in an update query, but it doesnt like me :)
any help would be great :)
i have a % use field in my table that it updates to, but im flexible :)
thanks
View 1 Replies
View Related
Apr 5, 2007
Hello all,
I have a requirement to give a % figure from 2 time fields. I would have thought this was simple, but when I divide the fields I keep getting #Error. Its not an error caused by a divide by zero, i can recify those. Can anyone point me in the right direction to get a % from 2 time fields.
Cheers
vmed
View 5 Replies
View Related
Jan 13, 2008
This is probably simple but it's something I haven't had to do before.
I have a main table.
I have a filter query based on this table.
I have a report, based on the query, which displays the total number of records in the query.
In the same report, I would like to display this total as a number (already done, obviously) and also as a percentage of the total number of records in the main table.
How would I go about this?
View 1 Replies
View Related
Mar 24, 2006
Been searching for an answer to this one but still cant quite get it.
I am using an option group to subtract and add percentages on an amount in a text box. This is the code i am using but there is something wrong. My syntax is out.
Me.TechsRate = ((Me.Chargeout.Text - (Me.Option17.OptionValue /100))
I am trying to calculate 5% or 10% or 15% and so on, up to 35%
Thank you in advance
View 8 Replies
View Related
Jan 25, 2006
Is there a data type that I can use that will handle both text and numbers such as percentages? Or is there a way I can set the field type to text then convert the text to a percentage? I plan on using this field in a form so when the user inputs the info I will want to display it in the correct format. Any ideas or suggestions?
Thanks
View 2 Replies
View Related
Apr 22, 2008
I'm setting up a database for student evaluations. Students have several options as to how well the instructor did for each survey question. I've been able to set up the data entry form to my liking, and I can use a query to average the total answers to each question, including a count of how many people responded. HOWEVER, I need to calculate the percentage of responses for each option. For example, I need to know the percentage of students who picked "Excellent" for question 1, how many students chose "Very Good", how many chose "Good", etc., so on and so on for every question. How can I do that? I'm completely stuck and a novice user. HELP!!:eek:
View 3 Replies
View Related
May 4, 2006
can anyone explain how to use a percentage in a table.
i have a field designated as data type "number" and format set to Percentage.
when i go to datasheet view and attempt to enter in these percentage (1%,50%, 34%, etc) it is multiplying the data entered by 100 (100.00%,5000.00%,3400.00%, etc).
gotta be something easy.
TUKTUK
View 3 Replies
View Related
Apr 20, 2015
I'm trying to create a table in an Access Form or create a block of code to export the table with query results to Excel or PDF. In the end I would like to run a query or queries to populate the table or export the query results creating the table. I'm not sure the best way to create the table.
View 3 Replies
View Related
Nov 20, 2013
I'm creating a report that list multiple users providing an input of "approved" or "not approved" for a plurality of proposals. I'm trying to create a report that lists the percentage for each user that calculates the number of times the user inputs "not approved" over the total number of proposals that particular user reviewed.
For example,
Steve reviews 50 proposals, and of the 50 proposals Steve inputs 10 of those proposals to be "not approved". I need a calculated field that counts the number of times that Steve inputs "not approved" and calculates that 20% of proposals reviewed are not approved, of all the proposals he reviewed. The number of proposals are continuously being added so the number 50 will not always be the denominator.
There are at least 10 other users that I have to do the same calculation but if I'm able to do the example above.
View 6 Replies
View Related
Jul 27, 2012
We have a model at my job which shows every job code one can do (there are only about 25 of these jobs) For example, let's say one job is called "Trade Settlements" and it's been estimated that we spend about 1000 minutes a day doing this particular job across the entire floor.
Well, I want to come up with a way to allocate the minutes of this to certain hour blocks and determining whether our group is over/understaff given the results.
So let's say I want, 30% of it to be done from 9-10 am, 10% done over the next 4 hour time blocks, and 2-3 pm for the remaining 30%.
Thus, we'd get something something like 300, 100, 100, 100, 100, 300 minutes and 0's for other time blocks.
These percentages would be input fields so if anyone types in a percentage, they get # of minutes spent for that hour on that job. Ultimately we would add these numbers up with other jobs and be able to easily update from there for any job type we wanted.
View 1 Replies
View Related
Oct 22, 2013
I created a database to record time logged per workorder for each employee on my job. Each time log has a specific "Trade" attached to it along with a number of hours the employee spent on that workorder. I've created a report to display how much time the selected employee spent on each workorder (within a date range) and now I want to see what percentage of their time was spent on a particular "Trade" (for instance, during September Employee "name" spent "percentage" of their time on Electric, "percentage" on HVAC, "percentage" on Plumbing...[and so on])
I have trades listed in the table and in the time log, the form writes to the trades area of the table (probably very elementary for this discussion) and the report lists the name and grand totals with percentage of total time on each workorder, but does not list any trade information.
How can I add this into my report, preferably at the end (Report Footer?)
View 4 Replies
View Related
Jan 12, 2012
I have a database that I'm building off of a process that is currently done in excel. I want my percentages calculations to match what I get in excel but I'm finding the numbers to be off by as much as .4%. I'm pretty sure they issue has to do with the precision of its calculations but what the best settings are.
My percent numbers are currently set to the field size "Double" with a percent formatting. My currency numbers are set to the format Currency and decimal places on auto.
View 2 Replies
View Related
May 25, 2007
Is it possible to use the result from a calculation in a query as data for a field in the table the query is based on?
Basically, I have an event that has a start date and an end date. The table stores individual events and the query only shows those events that have a start date but nio end date.
Also, each event can restart later with a new start date and end date.
I want to use the dates to calculate the number of days duration for the event's instance and store that in the table for later use - each event is allowed only a certain number of days.
Then, I'll need to add up the number of days for each instance of an event, to see if it has reached the maximum allowed.
So, like this;
Table Fields:
eventID, eventtype, startdate, enddate, numdays
As soon as I enter an end date for an event, I want it to calculate the number of days since the start and put that in the numdays field.
Then, I'll need to add up all the numdays for each eventtype.
The part I'm really having trouble with, though, is just the part to do a calculation and put the answer in the table that the query is based on.
In the event builder I tried [numdays] = [enddate] - [startdate], but it always drops the numdays part, leaving me with = [enddate] - [startdate].
Any ideas?
View 2 Replies
View Related
Nov 3, 2004
Here's what I have. Three tables: data, EntityCurrency, and Rate. data and EntityCurrency has a 1 to many relation ship by vendor number(1 on entityCurrency and many to data). EntityCurrency has an intermediate relationship to Rate by Currency. I need to be able to take a field in data(field = amount) and devide it by a field in Rate(field = rate). Here's what I have come up with and it doesn't work. I tried this expression as one of the fields: Expr1: [Sheet1]![Amount]/[Rate]![Rate] and it gives me an error: You tried to excute a query that does not included the specified expression 'Sheet1!Amount/[Rate]![Rate]' as part of an aggregate function. I was just wondering anyone could help me with this.
View 1 Replies
View Related
Aug 19, 2007
I quess it should be simple. But I couldn't find an answer or example in Access books and online.
I have an access 2000 database with a Accounts Receivable table. I am building a query that returns accounts what are 60 days past due and calculating total ballance of ONLY past 60 days accounts. I managed to write a code to display 60 days past due acounts, but when I use UNION query, it calculates total from entire Accounts Receivable table, but I need only total ballance of past due accounts.
Here is my SQL code
SELECT [Accounts Receivable].InvoiceID, [Accounts Receivable].[Patient Last Name], [Accounts Receivable].[Patient#], [Accounts Receivable].InvoiceDate, [Accounts Receivable].PaymentAmount
FROM [Accounts Receivable]
WHERE ((([Accounts Receivable].InvoiceDate)<Date()-60))
UNION SELECT 'TOTAL', "","","",Sum([Accounts Receivable].PaymentAmount)
FROM [Accounts Receivable];
I need my query to look like this.
InvoiceID Patient Last Name Invoice Date Payment Amount
23 Smith 05/01/2007 $100
25 Doe 04/03/2007 $200
Total - - $300
Please help.
View 8 Replies
View Related
Aug 22, 2012
I'm trying to build some queries with calculations in, and I'm not able to do what I had hoped. Am I doing it wrong?
This is about sales.I'd like to firstly, be able to have a quick query, to see how many items a seller listed, with total price (this seems fine, if I count the item IDs, and sum hammer price in a query).And vice versa, by buyers.But, I'd like to sum for sellers, number of items Sold, Returned or Relisted.
I have a status (blank for active, "sold, "relisted" or "returned", and thought, I could "count", by the status = "Sold" (ie), but it won't accept the expression.
for sellers, I had hoped to have one query, with total items listed, total money made, then totals for still active, sold, returned and relisted items.
Am sure I'm doing something basic wrong, but I can't think what.
View 2 Replies
View Related
Aug 30, 2007
Hi, I'm a total newbie at Access, and know nothing about scripts. I've been operating at the level of using the Wizards and drop-down menus. I am trying to create a report that does two things:
1. Displays the results of queries that sum data from a table (I think I have this figured) and
2. Displays those sums as a percentage of a number that is input each time the report is run. (This is only one number that comes from a totally different place and has no prior relation to the data.)
Any help/advice that anyone could offer would be much appreciated!
Thanks!
View 5 Replies
View Related
Jul 30, 2007
I've imported an Excel file into a table and now I've created a Query from it.
I now need to Add Fields (names are not in the table) and calculate totals for these renamed fields some of the answers are going to be the result of two or three fields.
Any help would be greatly appreciated.
thanks
View 8 Replies
View Related
Jul 29, 2014
I'm trying to work out the difference between 2 records both of which have a call out date [bas start date]..basically the structure is
equipment number call number bas start date
12345678 112255 1/7/14
12345678 112256 3/7/14
What i'm after is the 4th column to work out the date diff... in this case 2 days the equipment can be multiple times so i might see equipment number 12345678 - upto 10 times with consecutive dates - all of which i need to know the difference between the current call date and the previous call date..
View 3 Replies
View Related
Mar 20, 2007
i am trying to run a query from a form which will bring up the no of days difference between the start and end date also on the same form.
The query doesn't bring back any results can someone please guide in what i am doing wrong.
Here is the query
SELECT DateDiff('d',[start date],[end date]) AS [no of days]
FROM [booked property]
WHERE ((([booked property]![start date])=[forms]![booking]![booked property]![start date]) AND (([booked property]![end date])=[forms]![booking]![booked property]![end date]));
Thanks
View 2 Replies
View Related
Jun 26, 2013
Is there a way to calculate three different rolling averages in one query?
I just inherited a database where someone is using three queries to capture the same information only with different time frames. They were calculating a rolling three month average, six month average, and twelve month average. I would like to combine these queries into one to reduce time spent running reports from the database. All three queries are based on one table. One of the columns in that table is called "Month Start Date". That field shows the first day of the month when a call was entered. I can get the query to tell me the first month in the three month period and the first month in the six month period, but I can't get it to calculate the averages of the calls that fall in those time frames. Here is the SQL for the query I have now. When I try to run this, I get the error message that my formula is not part of an aggregate function.
Code:
SELECT DISTINCT DateAdd('m','-2',(Max([Month Start Date]))) AS ThreeMonthStartDate, DateAdd('m','-5',(Max([Month Start Date]))) AS SixMonthStartDate, Max([Month Start Date]) AS MaxStartDate, IIf([Month Start Date] Between [ThreeMonthStartDate] And [MaxStartDate],Avg([All Call Rate]),' ') AS ThreeMonthAverageCallRate, LIST_WITH_TNC.Device, LIST_WITH_TNC.Model, LIST_WITH_TNC.[Item Num]
FROM LIST_WITH_TNC;
Is there a way to make this work?
View 2 Replies
View Related