A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query to calculate TAT



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2009, 02:01 PM posted to microsoft.public.access
navin
external usenet poster
 
Posts: 41
Default Query to calculate TAT

Hi,

I am trying to write a turn around time (TAT) query for one of my
tables. Users save the number of orders they placed in a table by Type
of PO (Standard and HOT) orders. when they save the details,
application calculates and saves the TAT value for each PO. so if TAT
for a PO is 2 days then it has missed the TAT.

I need to calculate how many Standard or Hot POs have missed TAT in
percentage.

Table:

PO# PO Type TAT (In Days)
1234 Standard 1
53453 Standard 1
45454 Standard 3
8787 Hot 1
6676 Hot 4
5655 Hot 5

formula used: count of POs which have missed TAT / total count of POs

In the above table out 3 standard PO, 1 PO has missed the TAT. so it
should calculate 1/3 or (33%)

Output:

Standard: 33%
Hot: 66%

I dont know how to get this.

Thank you in advance for the help.

Navin
  #2  
Old May 12th, 2009, 02:31 PM posted to microsoft.public.access
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Query to calculate TAT

"navin" wrote in message
...
Hi,

I am trying to write a turn around time (TAT) query for one of my
tables. Users save the number of orders they placed in a table by Type
of PO (Standard and HOT) orders. when they save the details,
application calculates and saves the TAT value for each PO. so if TAT
for a PO is 2 days then it has missed the TAT.

I need to calculate how many Standard or Hot POs have missed TAT in
percentage.

Table:

PO# PO Type TAT (In Days)
1234 Standard 1
53453 Standard 1
45454 Standard 3
8787 Hot 1
6676 Hot 4
5655 Hot 5

formula used: count of POs which have missed TAT / total count of POs

In the above table out 3 standard PO, 1 PO has missed the TAT. so it
should calculate 1/3 or (33%)

Output:

Standard: 33%
Hot: 66%

I dont know how to get this.

Thank you in advance for the help.



Try a query with SQL along these lines:

SELECT
[PO Type],
Sum(IIf([TAT]2,1,0))/Count(*) AS OverTAT
FROM tblPurchaseOrders
GROUP BY [PO Type];

That will give you the calculated value as a decimal fraction (e.g.,
0.33333333), but you can then format it as a percent.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.