Sum Group By

U

user

Hello

I have a query where I want the sum of Amt, Grouped by Numbers. I have
other fields that doesn't need to be summed or grouped but I still need to
see then.
For ex.

Number Amt Desc
1 5 scott
2 10 kayla
3 15 rob
2 20 mary.

I still want to bring in the column desc in my report, but it can be blank.
I did a Group By Number, Sum Amt, Group By Desc, but I getting 4 rows of data
and its' not subtotaling Number 2. I know it's b/c column desc, but how do I
leave the column blank, but still bring in the field.
The results I want to see are 3 rows.
Num Amt Desc
1 5
2 25
3 15.

Thanks
 
J

Jerry Whittle

In the query put something like this in the Field:

Desc: ""
or
Desc: Null

However that might cause a problem. You may need a slightly different name
something like so:

Desc2: ""
or
Desc2: Null
 
B

Bob Quintal

Hello

I have a query where I want the sum of Amt, Grouped by Numbers. I
have other fields that doesn't need to be summed or grouped but I
still need to see then.
For ex.

Number Amt Desc
1 5 scott
2 10 kayla
3 15 rob
2 20 mary.

I still want to bring in the column desc in my report, but it can
be blank. I did a Group By Number, Sum Amt, Group By Desc, but I
getting 4 rows of data and its' not subtotaling Number 2. I know
it's b/c column desc, but how do I leave the column blank, but
still bring in the field. The results I want to see are 3 rows.
Num Amt Desc
1 5
2 25
3 15.

Thanks

In the query design grid, in the row that says GROUP BY or SUM, you
can change the value to FIRST or LAST under the Desc column.
 

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