DSum in Queries

  • Thread starter Thread starter D
  • Start date Start date
D

D

I have a field in my query: New_Cost:[Allocated_Cost]+[Base]

Need to take the total of that column and divide by each record [New_Cost]
to come up with a percentage in a new field New_Cost_Percentage. Can this be
done with DSum and if so, how?
 
SELECT New_Cost,
New_Cost/DSum("New_Cost", "NameOfYourQuery") AS New_Cost_Percentage
FROM NameOfYourQuery;
 
Thanks Ken -- Works great!! As always, you come through. It is wonderful
having people like you out there in cyber world to help us out.

Ken Snell (MVP) said:
SELECT New_Cost,
New_Cost/DSum("New_Cost", "NameOfYourQuery") AS New_Cost_Percentage
FROM NameOfYourQuery;

--

Ken Snell
<MS ACCESS MVP>


D said:
I have a field in my query: New_Cost:[Allocated_Cost]+[Base]

Need to take the total of that column and divide by each record [New_Cost]
to come up with a percentage in a new field New_Cost_Percentage. Can this
be
done with DSum and if so, how?
 
D said:
Thanks Ken -- Works great!! As always, you come through. It is
wonderful
having people like you out there in cyber world to help us out.

You're very welcome.
 
Back
Top