Calculated Control

  • Thread starter Thread starter Anon
  • Start date Start date
A

Anon

I would like to put a sum total in a grouping level in a
report, but would like it to total values that correspond
to a specific detail item. Ex:

I have the first for months of 2004 listed in every
detail, and would like to sum only the values for April.

Intuitively , I would like to write Sum([TotalEEs] WHERE
[Month]="April") but this doesn't work, of course. Is
there an expression I can write to accomplish this?

Thanks in advance.
 
I would like to put a sum total in a grouping level in a
report, but would like it to total values that correspond
to a specific detail item. Ex:

I have the first for months of 2004 listed in every
detail, and would like to sum only the values for April.

Intuitively , I would like to write Sum([TotalEEs] WHERE
[Month]="April") but this doesn't work, of course. Is
there an expression I can write to accomplish this?

Thanks in advance.

=Sum(IIf([Month] = "April",[TotalEEs],0))

Since you have used [Month] = "April" as criteria, I've assumed you
are storing the month name as text. If [Month] is stored as a number,
then use IIf([Month] =6.
However if you are using the actual date field with a full valid date,
then use IIf(Month([DateField]) = 6, as criteria.
 
Back
Top