Percentage In A Query

Oct 28, 2005

Hi,

I am creating a database to help me monitor the students in my class. I have a query that takes a student mark from one table and compares it with the maximum mark available for the assessment/homework. In a calculated field called Percent I divide the mark by the maximum mark and then multiply by 100. This gives me the percent. I then have another calculated field which awards a grade from A to C and if they don't achieve a C they are awarded a Fail. The IIf statement looks like this:

Grade: IIf([percent]>="70","A",IIf([percent]>="60","B",IIf([percent]>="50","C","Fail")))

Here is the bit I don't understand. If a student gets 99 % they are awarded an A (cut offs are: 70% and above for an A, 60% to 69 % for a B and 50% to 59% for a C. 49% and below gets a fail). If they get 65% they get a B... all appears fine. But, if they should happen to get 100% the query says "Fail". Can someone shed any light?

Regards

Kevin

View Replies


ADVERTISEMENT

Getting Percentage As My Update Query

May 11, 2005

I created a "Percentage" column and wish to update it by using the "Loan Amount". I did an update query and in the update field i keyed

=[loan amount]/sum(loan[loan amount])

but it doesn't show up the records, anyone could help me pls? thanks

View 2 Replies View Related

Showing Percentage In A Query

Jan 29, 2007

Below is the code I am using in a query that produces results that look like:

Fault Category------------No Fault Totals
No Faults-----------------------77
Total Work Units---------------521

I would like to also show in the query the percentage of No Faults. In this instance I would need to divide
the 77 no faults by the 521 total work units. Is there a way to do this and show the answer in the query.
I do not want this in a report, just the query.

SELECT FaultCategory, COUNT(*) As [No Fault Totals]
FROM WorkUnitsFaultsMainTBL
WHERE BuildID IN ("E010","C809","F001","C810","F187","A910","M173","M174") AND
FaultCategory IN ('No Faults') AND
[TodaysDate] BETWEEN [Forms]![Queries_ReportsFRM]![StartDateTxt]
AND
[Forms]![Queries_ReportsFRM]![EndDateTxt]
GROUP BY FaultCategory

UNION ALL SELECT 'Total Work Units' As FaultCategory, COUNT([WorkUnit]) As [WU Totals]
FROM (Select Distinct [WorkUnit]
FROM WorkUnitsFaultsMainTBL
WHERE BuildID IN ("E010","C809","F001","C810","F187","A910","M173","M174") AND
[TodaysDate] BETWEEN [Forms]![Queries_ReportsFRM]![StartDateTxt]
AND
[Forms]![Queries_ReportsFRM]![EndDateTxt]) As vTbl;

View 1 Replies View Related

Showing Percentage In A Query

Jan 29, 2007

Below is the code I am using in a query that produces results that look like:

Fault Category-------No Fault Totals
No Faults-------------------77
Total Work Units-----------521

I would like to also show in the query the percentage of No Faults. In this instance I would need to divide
the 77 no faults by the 521 total work units. Is there a way to do this and show the answer in the query.
I do not want this in a report, just the query.


Code:SELECT FaultCategory, COUNT(*) As [No Fault Totals] FROM WorkUnitsFaultsMainTBL WHERE BuildID IN ("E010","C809","F001","C810","F187","A910","M173","M174") AND FaultCategory IN ('No Faults') AND [TodaysDate] BETWEEN [Forms]![Queries_ReportsFRM]![StartDateTxt] AND [Forms]![Queries_ReportsFRM]![EndDateTxt] GROUP BY FaultCategory UNION ALL SELECT 'Total Work Units' As FaultCategory, COUNT([WorkUnit]) As [WU Totals] FROM (Select Distinct [WorkUnit] FROM WorkUnitsFaultsMainTBL WHERE BuildID IN ("E010","C809","F001","C810","F187","A910","M173","M174") AND [TodaysDate] BETWEEN [Forms]![Queries_ReportsFRM]![StartDateTxt] AND [Forms]![Queries_ReportsFRM]![EndDateTxt]) As vTbl;

View 1 Replies View Related

Percentage Calculation In Total Query

Oct 11, 2005

Hi, All:
I have been struggling for this question for a long time.

I have a total query coming from two tables. This query has following field:
productline
device
component

The table has more field. One of them is status for component field.

My application is that there are many productline. Under each productline, there are many devices. Under each device, there are many components. Each component has one of 4 statuses. The status is text value, 'Yes', 'No', 'UR', and blank.

In the form, I need to use continuous form to display each device with totalcomponent (I use Count of component), percentage of status1 based on totalcomponent, percentage of status2, etc.

My question is:
I tried to use Count(IIF([status] = 'Yes', 1, 0)) to get percentage. But [status] = 'Yes' seems not right because I got a count of all statuses, the same result of CountOfComponent

Really need help
Thank you much
awu10

View 1 Replies View Related

Queries :: Calculate Percentage In Query

Apr 16, 2013

How to calculate the percentage of kilometers per order compared to the total number of kilometers per carrier.

In the attached screenshot send queries where I need formula.

Mileage on the orders of the field called "Korkma" . The formula should look like: # [Korkm] / [total kilometers per carrier] #.

I do not know how to get the total mileage driven by the carrier (the carrier is in the query in the Field Name Plate) for the month.

For example:

date 1.1.2013.,Plate:Pribus Korkm= 37
date 2.1.2013.,Plate: Pribus,Korkm=56
date 10.1.2013.,Plate: Pribus, Korkm= 70
Formula: [37]/[163] = 0,23
[56]/[163]= 0,34
[70]/[163]= 0,43

View 1 Replies View Related

Queries :: Percentage Calculation In A Query?

Aug 5, 2014

I am trying to set up a calculation between two values to show the percentage difference. In Excel, for example, I would have two values, £905,175 and £891,563, and I would enter =A1-G2)/ABS(A1), which would then return a plus or minus percentage value. how to do this in a query using Access 2010?

View 3 Replies View Related

Queries :: Adding Percentage Field Into Query

Apr 25, 2014

I have a database which tracks the performance of my team and how long it took them to send something out to the customer. We have a target of 5 minutes.

So I quite a few queries to drill down this information. I have a summary query that takes that information and tells me the total amount of things sent, the amount of things sent in time and the amount of things sent late.

My team have to get at least 95% out on time. So how would I go about adding this bit into the query. The calculation is:

The amount sent on time / the total amount * 100

But is there anyway to add this into a 4th column displayed next to these figures?

Looking around a few people have talked about SQL but I no nothing about this and it seems quite daunting, is there a way to do this as a calculated field?

View 1 Replies View Related

Queries :: Add Percentage Column To Crosstab Query

Apr 12, 2013

I have created a cross tab query that contains a row heading for Entity and Total Cases. I would like to have a percentage of the Case Total for Each Category as well as the count for each category. It works fine for just the counts and here is the sql behind it:

TRANSFORM Count(CASEDATA.CASESTATUS) AS CountOfCASESTATUS
SELECT IUIDCODES.CODEDESCRIPTION, Count(CASEDATA.CASETYPECODE) AS CountOfCASETYPECODE
FROM (CASEDATA INNER JOIN CASESTATUSCODES ON CASEDATA.CASESTATUS = CASESTATUSCODES.CODEID) INNER JOIN IUIDCODES ON CASEDATA.IUID = IUIDCODES.CODEID
WHERE (((CASEDATA.CASETYPECODE)=63) AND ((CASEDATA.FYSTATUS)=6 Or (CASEDATA.FYSTATUS)=7 Or (CASEDATA.FYSTATUS)=8))
GROUP BY IUIDCODES.CODEDESCRIPTION
PIVOT CASESTATUSCODES.CODEDESCRIPTION;

View 2 Replies View Related

Queries :: Update Query Percentage Prompt

Mar 28, 2015

I need to do a update query with prompt to input a percentage.

View 11 Replies View Related

Queries :: Calculate Percentage Per Passengers In Query

Apr 19, 2013

To calculate the percentage of the number of passengers in the total number of passengers per single order using query:

Code:
SELECT

Code:
A.Date, A.Plate, A.Pax, A.Agency, A.Code, IIf ([pax]> 0, Round ([Pax] / (SELECT Sum (Pax) FROM Sheet2 as B WHERE B.Date = A.Date and B.code = A.code), 2), 1) AS KOR
FROM Sheet2 AS A
ORDER BY A.Date;

Query works fine in all cases except one, and that is when the encounter a same order in one day

01/04/2013. D_1 0pax
01/04/2013. D_1 5pax

in this case the formula gives a coefficient of 1 to 0 passengers and coefficient of 1 to 5 passengers, should be given a score of 0 0 of passengers and 1 to 5 passengers

View 1 Replies View Related

General :: Making A Query To Calculate The Percentage Of Change?

Mar 27, 2013

I have this table

Year AvgOfValue
2005 109.061690295772
2009 106.801581389669

I have to calculate the percentage of change of the values. I have very basic knowledge. How can I make a query to calculate the percentage of change?

View 2 Replies View Related

Queries :: Show Total Of Query Results With Percentage?

Apr 14, 2015

I've just made this query at work, it brings up the results from a database of telephone surveys. about going all gestapo on the table names and codes, I'm unsure as to how told off I could get for placing identifiable images on the internet

query.png

basically I would like to extend this query so it shows the sum of the "CountOfQ1 22" column and also shows what percentage of that total each entry in the "Q1 22" column is.

This will enable me to have results for the day sent to me at home every night at close of business as the person supervising the call centre at the time can run the query and email me the results.

View 4 Replies View Related

Queries :: Calculate Differential Between Average Earnings And Percentage Within Crosstab Query

Apr 9, 2014

I obtained data for earnings by industry for men and women over time (5 years). I developed crosstab query that showed the average earnings for men and women for the 5 years.

Now I want within this query to calculate the differential between men and womens average earnings and calculate a percentage within this crosstab query. I tried to use Expressionbuilder with little luck.

View 6 Replies View Related

Percentage Help

Jul 20, 2005

I have a table that documents the result of unit inspections. The data is Date inspected (once/month), Unit, and about 12 yes/no fields.

I want to run a query that shows the percentage compliant (yes) of all of the categories per month. I also want to be able to graph the results for one year per month to show trends.

What is the best way to do this?

Thanks,
Jason

View 8 Replies View Related

Percentage In Report

Aug 9, 2005

Hi, i have poduced a report and i want to calculate some percentages. Some of the fields i have are:

Total Sales Clothes Shoes Pants

200 20 120 60

% 100% 10% 60% 30%


As you can see in total 200 sales were made, 20 clothes sales, 120 shoe sales etc and below it a percentage of each of the sale types. I have put this ' =Sum([Clothes]/[Total Sales])*100 ' in to calculate the percentage...but it does not work...Any help would me much appreciated :)


*This hasn't shown up very well...hope you understand it?!

View 1 Replies View Related

Maths/Percentage

Jun 19, 2006

Hello, I'm stuggling to work out how to go about setting up a formula.

I have 497 students 186 are Male 311 are Female. How do i work out the percentage of Male and Female students? I have no idea how to do the Math behind this so cannot start to add it to my database. If anyone can show me how to calculate this it would be really helpful.

regards

Pete

View 2 Replies View Related

Access 97 Percentage ?

Dec 3, 2007

I need to be able to store percentages in an Access 97 table. I have set the data type to double and 4 decimal places, but when I enter .14, Access rounds to 0 and stores it as zeros.

What am I doing wrong?

View 2 Replies View Related

Format As A Percentage With An Iif

Jul 4, 2005

In one of my queries I calculate a percentage based on a change from one year to the next; however, sometimes there will not be any prior year data hence the percentage is undefined (i.e. current year amount/0=undefined). To stop the query from displaying an error when this is the case I wrote the following:

CapitalSurplusChange: IIf([P/Y Operating Data]![CapitalandSurplus]=0,"N/A",(Nz([C/Y Operating Data]![CapitalandSurplus],0)-Nz([P/Y Operating Data]![CapitalandSurplus],0))/Nz([P/Y Operating Data]![CapitalandSurplus],0))

I have the properties of the field set to percentage, but the calculation does not display as a percentage but as a long decimal. If I take out the Iif the percentages display fine however there are errors for the undefined calculations (hence why I inserted the Iif). How can I amend the code above to only display the "N/A" answers as text. I know about the formatpercent function, however I am exporting this output to excel and this when using the formatpercent or formatnumber operation the data still displays as text and not a number. Any ideas?

View 3 Replies View Related

Percentage Problem

Dec 6, 2005

Hi,

I have a database which contains the following column: -

TYPE OF COVER

This column has various covers in it i.e. 'COMP', 'TPFT', 'TP' etc

I would like to be able to run a query that shows the following columns: -

TYPE OF COVER , TOTAL NUMBER OF EACH COVER, PERCENTAGE TOTAL

I am new to SQL and would be grateful for some advice.

Regards

View 1 Replies View Related

Count And Percentage

Jan 16, 2007

I have a Query that gives me the output as follows:

Code___DateofReview___Response___CountofReponse
AAA____12/19/2006_____0_________3
AAA____12/20/2006_____1_________2
AAA____12/20/2006_____0_________1
AAA____1/4/2007_______1_________2

The Field "Response" can either be 0 or 1. The Variable "Countofresponse" gives me the Count of response when it is 0 and 1 for a given Date of Review.

How do I modify this query so I can get a Percentage value added to this list. I would like to see the following result but not sure how to arrive at this:

Code___DateofReview___Response___CountofReponse___ PercentValue
AAA____12/19/2006_____0_________3________________100%
AAA____12/20/2006_____1_________2________________66%
AAA____12/20/2006_____0_________1________________34%
AAA____1/4/2007_______1_________2________________100%

Can anyone help please?

View 3 Replies View Related

Percentage Queries

Aug 15, 2007

I have about 40 queries based on employed trainees from different groups(MMF, MKO, CNP,...). Now, what I'm trying to do is find the percentage of trainees employed from the total trainees, % employed in community from total trainees, % employed at wuskwatim from total trainees,... and so on.

If you take a look at my DB, you will find I have have MANY queries made. Is there an easier way to find this kind of information?

Any suggestions would be appreciated.
18448

View 3 Replies View Related

Percentage Expression

Oct 24, 2007

Hello All,

I am not sure what I am doing wrong. I am trying to get a percentage of two numbers and the expression is not comming out right. This is the expression:

Expr1: [Ontime PU.CountOfP Performance]-[Late PU.CountOfP Performance]/[Ontime PU.CountOfP Performance]

Here is what it should do:

1242-68/1242=0.94524959742351046698872785829308 (which would be 95%)

For reason it is not doing this?????

Any Ideas????

Thanks

View 11 Replies View Related

Calculate Percentage

Mar 22, 2008

In a report, I need to calculate the percentage of clients that respond "Yes" to a question on a survey. I need to create a query that will return the count of the number of "Yes" responses, and the number of total responses.
For example, if 10 clients complete the survey, and seven respond "Yes", I need the 2 fields in the query to be 7 and 10. So far, I have only been able to do this using multiple queries.
Thank you.

View 1 Replies View Related

Expression To Get A Percentage

Jan 22, 2005

For several days now, I have been trying to write an expression, in a report, to get a percentage. I am new to Access so I don't completely get it yet. This is the expression I wrote (only works sometimes):

=[pathjbo50]/([pathjbo50]+[pathcol50]+[pathpp50])

This expression only works when all the fields are populated. If any of the fields are empty, I get nothing.

Please help!

View 2 Replies View Related

Use Of Nz In A Percentage Calculation

Jul 17, 2005

In a query I am calculating a percentage from two fields in a table. ever, if the values are 0 and 0 then the percentage comes up as an error (#Error). How do I use the nz function in this case to convert error into zero and where in the query do I put the expression?

View 1 Replies View Related







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