Solved

Sum If in a report

Posted on 2008-06-25
8
878 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 - Microsoft MVP, Access and Data Platform) 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

740 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