Sum If

R

ryguy7272

My field names are 'Advertiser', 'SumOfQ308', and 'SumOfQ408'. I am trying
to sum all values that are in the Advertiser field and named 'All'. Below is
what I thought would work, but it doesn't work.
=Sum(IIf([Advertiser]=[All],[SumOfQ308],0))

Right now I am prompted to enter a parameter value before the report runs;
that doesn't seem right.


I'd appreciate any help!

Thanks so much,
Ryan--
 
R

ryguy7272

I just figured it out:
=Sum(IIf([Advertiser]="All",Nz([SumOfQ308],0),0))

One more question... How do I hide all records that don't match my
criteria? For instance, I only want to sum Advertisers if they are named
'All', 'East', and 'West'. How can I sum only these three, or rather do one
sum for each of these types of advertisers, and hide all others?

Thanks,
Ryan---
 
R

ryguy7272

Let me define the problem a little better. I think it boils down to this...
My labels are being repeated on each page of my report. I am getting a total
of 884 pages in my Report and I should only have one page. I have all my
data calculated correctly now, using these types of functions:
=Sum(IIf([Advertiser]="All",Nz([SumOfQ308],0),0))
=Sum(IIf([Advertiser]="All",Nz([SumOfQ408],0),0))

I want to use a couple of Labels just above the areas where the calculations
are done and I want to use labels to the left of the area where the
calculations are done. The problem is that these labels keep getting
repeated over and over again. I actually want the labels to appear only
once!!

If someone knows how to handle this, please let me know.


Regards,
Ryan---

--
RyGuy


ryguy7272 said:
I just figured it out:
=Sum(IIf([Advertiser]="All",Nz([SumOfQ308],0),0))

One more question... How do I hide all records that don't match my
criteria? For instance, I only want to sum Advertisers if they are named
'All', 'East', and 'West'. How can I sum only these three, or rather do one
sum for each of these types of advertisers, and hide all others?

Thanks,
Ryan---

--
RyGuy


ryguy7272 said:
My field names are 'Advertiser', 'SumOfQ308', and 'SumOfQ408'. I am trying
to sum all values that are in the Advertiser field and named 'All'. Below is
what I thought would work, but it doesn't work.
=Sum(IIf([Advertiser]=[All],[SumOfQ308],0))

Right now I am prompted to enter a parameter value before the report runs;
that doesn't seem right.


I'd appreciate any help!

Thanks so much,
Ryan--
 
R

ryguy7272

Oh! I got it! I just used a TextBox instead of a Label. I set the Control
Source to: ="Q308". Finally, I set Hide Duplicates to 'Yes'. Access is a
great reporting tool!!!


Ryan---



--
RyGuy


ryguy7272 said:
Let me define the problem a little better. I think it boils down to this...
My labels are being repeated on each page of my report. I am getting a total
of 884 pages in my Report and I should only have one page. I have all my
data calculated correctly now, using these types of functions:
=Sum(IIf([Advertiser]="All",Nz([SumOfQ308],0),0))
=Sum(IIf([Advertiser]="All",Nz([SumOfQ408],0),0))

I want to use a couple of Labels just above the areas where the calculations
are done and I want to use labels to the left of the area where the
calculations are done. The problem is that these labels keep getting
repeated over and over again. I actually want the labels to appear only
once!!

If someone knows how to handle this, please let me know.


Regards,
Ryan---

--
RyGuy


ryguy7272 said:
I just figured it out:
=Sum(IIf([Advertiser]="All",Nz([SumOfQ308],0),0))

One more question... How do I hide all records that don't match my
criteria? For instance, I only want to sum Advertisers if they are named
'All', 'East', and 'West'. How can I sum only these three, or rather do one
sum for each of these types of advertisers, and hide all others?

Thanks,
Ryan---

--
RyGuy


ryguy7272 said:
My field names are 'Advertiser', 'SumOfQ308', and 'SumOfQ408'. I am trying
to sum all values that are in the Advertiser field and named 'All'. Below is
what I thought would work, but it doesn't work.
=Sum(IIf([Advertiser]=[All],[SumOfQ308],0))

Right now I am prompted to enter a parameter value before the report runs;
that doesn't seem right.


I'd appreciate any help!

Thanks so much,
Ryan--
 

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