Solved

Sum If in a report

Posted on 2008-06-25
8
851 Views
Last Modified: 2013-11-28
I need to do a basic sum if in Access and I can't figure out how to do it.

I would like to sum [TimeSpent] if PresenterStatusID=1
sum [TimeSpent] if PresenterStatusID=2
sum [TimeSpent] if PresenterStatusID=3
I am just putting them in seperate fields in the report footer
How do I get that to work in a report?

Thanks
0
Comment
Question by:Jennerator
  • 4
  • 3
8 Comments
 
LVL 75
ID: 21870226
Not quite following the 3 separate conditions ???
0
 

Author Comment

by:Jennerator
ID: 21870250
I think I have figured it out, but essentially what I need to know is if the presenter status is 1 (staff), how much time did then spend and If presenter status 2 (Volunteer) sum thier time seperately and so on. I was tring to do this in a footer, but there is no such thing as a SumIf statement that I know of so instead I am doing seperate if's in the details and then will sum in the footer.

Do you know of a more efficent way to handle this? It seems so basic.
Jenn
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 50 total points
ID: 21870295
"SumIf"

Well, you can do things like this:

=Sum(IIF([FooBar]="Jenn", 1,0) )

so ... each time the field FooBar = "Jenn", it adds 1 to the sum.

Does that help?

btw ... when are you gonna upgrade to a Premium Membership ... ?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Closing Comment

by:Jennerator
ID: 31470786
Doh! That is exaclty what I needed. My brain did not work that way! Thank you.
0
 

Author Comment

by:Jennerator
ID: 21870332
Premium Membership? Where would i find info on that?
0
 
LVL 75
ID: 21870404
Miriam (mbizup) will be along to answer that ... since oddly enough, I can't find it ... lol.

Standby ...

mx

0
 
LVL 75
ID: 21870476
Love that username ....:-)

thx miriam ...

mx
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running sum query 6 33
Improving performance of a query that uses a subquery 9 31
Is it possible to reset DSum? 12 43
Access 2010 Query Syntax 5 23
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now