Sum of Sum in a Report

M

Mark Wolven

I have a report that I have built off of a query. I have a calculated
field [KeyMapped] in a query that basically looks at the value of a
few fields, and returns a 1 or 0.

KeyMapped: IIf(([Mapped]=1 And [Key]="Yes"),1,0)

This function displays properly at the Detail level in the report.
There are multiple records in the detail for this grouping.

At the first grouping level of the report, I want to show text based
on the sum of the values of this calculated field.

KeyMappedText =IIf([Sum Of KeyMapped]<>0,"Key Mapped","Key Not
Mapped") - displays the etxt that I need - this works.

Sum Of KeyMapped =IIf(Sum([KeyMapped])<>0,1,0) - this is set to not
be visible, and this displays properly at the first grouping level.
Running Sum set "OverGroup"

The problem is at the second grouping level, I want to display the Sum
of the Sum Of KeyMapped from the first grouping footer. I tried using
sum([Sum Of KeyMapped]) - which doesn't work. Nothing else I tried
worked.

What I am trying to do is generate a count of the fields and values
that meet a set of criteria - once the criteria is met once within
that group, the rest of the records don't matter - I don't want to
double count them either. Any thoughts on how to generate this within
a query?
 

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