Calculating Percentages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The SQL view of my query is as follows:

SELECT IIf([Order]>819000000,"PP02","PP01") AS Type, Sum([tblWIP].[Amount])
AS Amt
FROM tblWIP
GROUP BY IIf([Order]>819000000,"PP02","PP01");

How do I add a calculated field that will compute % of WIP $ by Order Type?

For Example:

Type Amount Pct
PP01 $45,000 56.25
PP02 $35,000 43.75

TIA,
Craig
 
Do this in a report where you can set a control source to:
=Amt/Sum(Amt)
 
I'm not sure this will work, but I would try


SELECT IIf([Order]>819000000,"PP02","PP01") AS Type,
Sum([tblWIP].[Amount]) AS Amt,
Sum(TblWip.Amount)/(SELECT SUM(Amount) From tblWip) as PerCentage
FROM tblWIP
GROUP BY IIf([Order]>819000000,"PP02","PP01");
 

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

Back
Top