HELP WITH QUERY EXPRESSION

W

William

I have a very simple query in which I can't the expression I created does not
work.

Column one has a list of names. In column two, I want to take the number
285,000 and divide it by a COUNT of the list of names in column one.

The formula I tried is:

Expr1: 285000/Count([ISDs]![CountColumn])

The error message when running the query is:

"Cannot have aggregate function in GROUP BY clause."

Any ideas?
 
M

MGFoster

William said:
I have a very simple query in which I can't the expression I created does not
work.

Column one has a list of names. In column two, I want to take the number
285,000 and divide it by a COUNT of the list of names in column one.

The formula I tried is:

Expr1: 285000/Count([ISDs]![CountColumn])

The error message when running the query is:

"Cannot have aggregate function in GROUP BY clause."

Any ideas?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In the Expr1: column, in the Total cell change Group to Expression & see
if that works. My guess is it won't give u what u want.

If there are 200 names you probably want 285000/200, right? Your
formula won't give that, unless it is the only column (field) in the
SELECT clause:

SELECT 285000/COUNT(CountColumn) As Pct
FROM ... etc. ...

An easy way to get what you want is to use a Report. There are a lot of
examples in the archives of this newsgroup. Use Google Groups search to
find them.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBScjkuYechKqOuFEgEQLQqQCgkr7DtiMA8RQua1hf97rpGwVkvX4AoPvh
D+Ww79vYGK507sGRkDDf7Jnp
=Js7O
-----END PGP SIGNATURE-----
 
K

KC-Mass

William,

Why don't you go to the SQL view; copy that and post that here. People will
then have the detail they need to help you.

Regards

Kevin
 

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