conditional getting a new "field" in a Query ???

M

Martin

In a Query, we can create a new query field by (for example) : totoal
amount: month amount , and then set the choice to SUM


My question is:

I only want to sum up some part of the "month amount" (for example, if
[company]="abc company" ) , however, I don't like to use the CONDITION
choice, because other fields needs the whole data.

How to do?

Thanks!


Martin
 
M

MacDermott

If you want a separate column for each company, you might consider using a
crosstab query.

If you really just want a single column for "abc company", but also need
sums, etc for all data, you can define your field like this:
ABCAmount: IIF([company]="abc company" , [month amount], 0)
and sum that.
 
Top