Percent help

G

Guest

Hello I have a query that I want to divide the employees delay time by the
employees worked time. I made this query which works but the decimal place is
in the wrong spot. I am looking for a percentage like this 35% but its giving
me 353% I have the query "Delay Percent: Sum([DT REGULAR]/[EMPLOYEE TIME])"
fomat set at percent and I have the text box on my report set at "decimal
place 0 format percent". What am I doing wrong? Here is the SQL code:

SELECT Sum([DT REGULAR]/[EMPLOYEE TIME]) AS [Delay Percent],
tblMain.[EMPLOYEE NAME]
FROM tblMain
WHERE (((tblMain.[EMPLOYEE NAME])=[ENTER EMPLOYEES NAME]) AND
((tblMain.[DAYS DATE]) Between [Enter Start Date: (mm/dd/yy)] And [Enter Stop
Date: (mm/dd/yy)]))
GROUP BY tblMain.[EMPLOYEE NAME];
 
R

Regan via AccessMonster.com

Hi

What if you divided Delay percent by 10

Sum([DT REGULAR]/[EMPLOYEE TIME])/10 AS Delay Percent,

Does that work?


Hello I have a query that I want to divide the employees delay time by the
employees worked time. I made this query which works but the decimal place is
in the wrong spot. I am looking for a percentage like this 35% but its giving
me 353% I have the query "Delay Percent: Sum([DT REGULAR]/[EMPLOYEE TIME])"
fomat set at percent and I have the text box on my report set at "decimal
place 0 format percent". What am I doing wrong? Here is the SQL code:

SELECT Sum([DT REGULAR]/[EMPLOYEE TIME]) AS [Delay Percent],
tblMain.[EMPLOYEE NAME]
FROM tblMain
WHERE (((tblMain.[EMPLOYEE NAME])=[ENTER EMPLOYEES NAME]) AND
((tblMain.[DAYS DATE]) Between [Enter Start Date: (mm/dd/yy)] And [Enter Stop
Date: (mm/dd/yy)]))
GROUP BY tblMain.[EMPLOYEE NAME];
 
J

John Spencer

Try dividing

Sum([DT REGULAR]) / Sum([EMPLOYEE TIME]) as DelayPercent

Your formula was adding the calculated percentage for each day together.
So if employee A had .3 on day 1 and .5 you ended on day 2 up with .8
for the two days.



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
G

Guest

Thanks for the help!!! Worked great

John Spencer said:
Try dividing

Sum([DT REGULAR]) / Sum([EMPLOYEE TIME]) as DelayPercent

Your formula was adding the calculated percentage for each day together.
So if employee A had .3 on day 1 and .5 you ended on day 2 up with .8
for the two days.



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Hello I have a query that I want to divide the employees delay time by the
employees worked time. I made this query which works but the decimal place is
in the wrong spot. I am looking for a percentage like this 35% but its giving
me 353% I have the query "Delay Percent: Sum([DT REGULAR]/[EMPLOYEE TIME])"
fomat set at percent and I have the text box on my report set at "decimal
place 0 format percent". What am I doing wrong? Here is the SQL code:

SELECT Sum([DT REGULAR]/[EMPLOYEE TIME]) AS [Delay Percent],
tblMain.[EMPLOYEE NAME]
FROM tblMain
WHERE (((tblMain.[EMPLOYEE NAME])=[ENTER EMPLOYEES NAME]) AND
((tblMain.[DAYS DATE]) Between [Enter Start Date: (mm/dd/yy)] And [Enter Stop
Date: (mm/dd/yy)]))
GROUP BY tblMain.[EMPLOYEE NAME];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query error help 6
Update query help 3
Query expression help 11
Query and text box help on formula 6
Formula help for percent 4
Query not giving right percent decimal 7
VBA Help on Loop 1
need help with percent 4

Top