Getting a percentage

  • Thread starter Thread starter ten-d
  • Start date Start date
T

ten-d

I have a query that is pulling this info:

Current: Sum(IIf([Main]![TC] In
("010","019","400","409","460","469","600","610","620")
And [Main]![Aging]=0,[Main]![Amt],0))

Then, I want to compare this result to the "TOTAL" amount
not just the stuff with aging = 0.

I created this query to calcuate:
Current %: Sum([Current])/Sum([Main]![Amt])

But it's saying that I can use subqueries in this query.
How can i get this percentage?
 
Hi,

Use Domain Aggregrate Functions. Example:

DSum("[Current]","[table/query name]")/Sum([Main]![Amt])

Note: I'm not sure what is Sum([Main]![Amt])


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Content-Class: urn:content-classes:message
| From: "ten-d" <[email protected]>
| Sender: "ten-d" <[email protected]>
| Subject: Getting a percentage
| Date: Tue, 23 Mar 2004 08:03:25 -0800
| Lines: 14
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcQQ8F9zQ1DWEpMaReWlFemrigthAg==
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.queries:194795
| NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
| X-Tomcat-NG: microsoft.public.access.queries
|
| I have a query that is pulling this info:
|
| Current: Sum(IIf([Main]![TC] In
| ("010","019","400","409","460","469","600","610","620")
| And [Main]![Aging]=0,[Main]![Amt],0))
|
| Then, I want to compare this result to the "TOTAL" amount
| not just the stuff with aging = 0.
|
| I created this query to calcuate:
| Current %: Sum([Current])/Sum([Main]![Amt])
|
| But it's saying that I can use subqueries in this query.
| How can i get this percentage?
|
 
Back
Top