Error message in totals query.

F

Frank Martin

I get "You tried to execute a query that does not include the specified
expression 'Expr1/Expr2' a part of the aggregate function" as an error
message in my totals query when I try to divide the numbers in one column
with those in another column.

Is there some other way to do this?

Please help, Frank
 
W

Walter Steadman

That could be that the fields are not included in the query grid or that you
don't have GROUP BY or something in the TOTAL portion of the query Grid.
Look at the left hand side of the query grid in the row for Totals, make
sure you have Group By selected under the two expression fields. I think
you have to have something selected in all fields that are in the grid, but
I could be wrong there.

I just ran it and that is where I found the problem. I am not an expert so
please know that my advice is not as stable as some of the guru's on here.
 
G

Guest

If you are using grouping and are calculating the sum for fields 1 and 2,
select "Expression" instead of "Group By" in the column you are calculating
Expr1/Expr2
 
F

Frank Martin

Thanks for the replies, but I solved it by creating a normal query based on
the totals (grouped) one and then using its fields for the calculations.

It works fine now.
 

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