GROUP BY QUERY

J

JUAN

Hello,
I have a select query with sample fields:
Cust Name Percent Total1 Total2 -->This is
the sum of lets say a few fields.
Test1 17.65% 34 6
Test1 0.00% 4 0
Test1 24.10% 83 20

Percent base on : Format([Total2]/[Total1],"Percent")

Now what I want to do is a group query, but since I have a
Percent field, I'm not sure if this is possible.
I tried but doesn't work. If I delete the Percent field,
and I use GROUP BY Cust Name, Sum Total1, Sum Total 2
it does look fine:
CUST NAME TOTAL1 Total2
TEST1 121 26

But I would like to show percent. This is not a big
problem since I can export to Excel and then add a
field to calculate percentage. But was hoping if its
possible to do a Group query if one has percentage fields.

Any feedback would be appreciated.
Thanks,
Juan
 
K

Kelvin

You are on the right track. Leave out the percent field from the first
query and create another percent field in this query. TotalPercent:
Format(sum([Total2])/sum([Total1]),"Percent"). Set the grouping for this
field to expressions.

Kelvin
 

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

Top