Error message in totals query.

  • Thread starter Thread starter Frank Martin
  • Start date Start date
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
 
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.
 
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
 
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.
 
Back
Top