Counting with 2 Conditions

I created a report and would like to get a count of records with two 
conditions.  Here is what I entered:

=Abs(Sum(IIf([terminate]=-1,1,0)) And [caseload]="SA")

This information is entered in an unbound text. 

I would like to get a total count where the terminate field (yes/not) is 
checked and the caseload meets a certain criteria.

Thank you!  


0
Utf
12/26/2007 5:42:01 PM
access.reports 4434 articles. 0 followers. Follow

2 Replies
565 Views

Similar Articles

[PageSpeed] 12

TomP wrote:

>I created a report and would like to get a count of records with two 
>conditions.  Here is what I entered:
>
>=Abs(Sum(IIf([terminate]=-1,1,0)) And [caseload]="SA")
>
>This information is entered in an unbound text. 
>
>I would like to get a total count where the terminate field (yes/not) is 
>checked and the caseload meets a certain criteria.
>

	=Sum(IIf([terminate]=-1 And [caseload]="SA",1,0))
or
	=Abs(Sum([terminate]=-1 And [caseload]="SA"))

-- 
Marsh
MVP [MS Access]
0
Marshall
12/26/2007 7:02:24 PM
That worked!   Thank you so much for your help and patience!  Happy New Year!

:-)

"Marshall Barton" wrote:

> TomP wrote:
> 
> >I created a report and would like to get a count of records with two 
> >conditions.  Here is what I entered:
> >
> >=Abs(Sum(IIf([terminate]=-1,1,0)) And [caseload]="SA")
> >
> >This information is entered in an unbound text. 
> >
> >I would like to get a total count where the terminate field (yes/not) is 
> >checked and the caseload meets a certain criteria.
> >
> 
> 	=Sum(IIf([terminate]=-1 And [caseload]="SA",1,0))
> or
> 	=Abs(Sum([terminate]=-1 And [caseload]="SA"))
> 
> -- 
> Marsh
> MVP [MS Access]
> 
0
Utf
12/27/2007 3:35:01 PM
Reply:

Similar Artilces:

Creating a new field based on conditions
I have a database that tracks insurance information for our various vendors. Each insurance type has 2 fields - a requirement field (yes/no), and an effective field (some show an expiration date, some are yes/no). I have created a query that will return only the records for which insurance is required but is expired/missing. My problem is that I want to create a new field that is calculated based on the values in the other two fields in order to make the resulting report more user-friendly. For example, if GLRequired is True and GLExpiration is <Now(), I want the new field to say...

parsing a date and time field #2
I am having trouble parsing the date and time in a field. I download data from a data base and the date and time come together in one field. I want to seperate the two. The date and time comes across as the following: "2/1/2009 14:37" in the cell. When I parse it, it seperates into three columns as follows: "2/1/2009", 2:37 AM", and "PM" I can see what is going on but I would like to get two columns with one as the date and the other as the correct time. are they any ideas on how to address this? Try using the TimeValue and DateValue functions. First format ...

Physical Inventory Count Service Provider
Would someone be able to recommend a service provider that would be able to come in an apparel retail store and do a physical inventory count? we've tried newestech handhelds, but we just dont have the right staff to do it. TIA -- Eddie B No suggestions? We are in Southern California. -- Eddie B "Eddie B" wrote: > Would someone be able to recommend a service provider that would be able to > come in an apparel retail store and do a physical inventory count? we've > tried newestech handhelds, but we just dont have the right staff to do it. > > TIA ...

Money Central Portfolio #2
My print function has gotten corupted. When I print it flips to WORD / format and prints in a format that is 4x normal. ...

macro #2
I am pretty new to using (or attempting to use) a Macro in a workbook. I am having trouble following how and what to do to even start the process; ie If there needs to be a worksheet already in progress or can I start from a new sheet. THEN where to go from there. Can I have some help in this area? Can some one supply me with a sample MACRO? Any help would be greatly appreciated Dan The best way to get started with macros is to use the Macro Recorder. Go to the Tools menu, choose Macros, then Record New Macro. Then, carry out some simple tasks and examine the code that is produced. ...

merging 2 cells without losing data?
How can I merge 2 cells without losing data from the other cell? Hi Bob Not possible I'm afraid. Try placing the dat from both cells into one and use "Center across selection" under Format>Cells>Alignment Merge cells always end up causing grief. they are best avoided. ***** Posted via: http://www.ozgrid.com Excel Templates, Training & Add-ins. Free Excel Forum http://www.ozgrid.com/forum ***** "bob" <bobree@hotmail.com> wrote in message news:%23JuOM9HGEHA.2308@tk2msftngp13.phx.gbl... > How can I merge 2 cells without losing data from the other...

Statements #2
How are statements sorted? Alphabetically by name or by account number? Does anybody know? -- Any help is appriciated, Deb Mine are done alphabetically by name. -- Elizabeth M. "Deb" <Deb@discussions.microsoft.com> wrote in message news:D58FEF32-7509-473B-A554-6A48E02697CF@microsoft.com... > How are statements sorted? Alphabetically by name or by account number? > Does > anybody know? > -- > Any help is appriciated, Deb ...

how to config Server for one user which has 2 mail address.
we have one NT4.0 + Exchange 5.5 Server "A" Email abc@xxx.com.cn ��and another windows2003 + exchange 2003 Server "B" abc@cn.xxx.com user name is same in A B��Mx record was be set ,question is how to config Exchange 2003 to receive down the mail to Server A , because of we need to replace A with B. thanks a lot. E2K3 setup guides you through common scenarios (like yours) pretty much holding your hand - on welcome screen tell it that you have existing E55 org and want to join it, then follow on-screen instructions. Having usable backup of Exchange databases and AD i...

Monthly count
HI, I have a table with Product field and SaleDate field. I need to make a query that will give me a count of number of times a product was sold on a monthly basis. In other words, the number of records for each product in a month. Something like each productname as columnheading and name of the month as row heading, and the count in the tabulation. do i need to use crosstab query to do this? could someone guide me here? Thanks very much. Ramesh 1. Create a query using your table(s). 2. Change it to a Crosstab query (Crosstab on Query menu.) 3. Type this expression into the F...

selected row count of list box
A2k Is there a way to get the selected row count of a list box dynamically as the user selects rows? Delphi has an event called "OnSelectionChanged" but Access is much more limited. I don't want the user to have to exit the list box or click a button or anything manual in order to see the # of rows he's selected. How can this be done? I know about "lstCusts.ItemsSelected.Count" but not sure what event to use it in to accomplish what I need. Thanks, Keith Never mind. I did this and it handles both mouse and keyboard selections: Private Sub lstCusts_AfterUpdat...

Macro
Here is one for you experts - I am a novice I want to add a macro to a worksheet that will print selected information held on certain rows of the worksheet. Once the 'button' has been selected a mesage box will pop up asking the user to input which row number he/she wishes to print. On input that number is matched to the corresponding row of the worksheet and that row is copied (without any formula - just cell values) and pasted into another worksheet where it is placed into other formats and printed. Seems like a simple(!!) job - but far to difficult for me to programme Can an...

conditional formatting in excel #3
how do you add a phrase to a field if the filed is blankl, also, can you have a notifiction sent to you when a date on a spreadsheet has expired? > how do you add a phrase to a field if the filed is blankl, What "phrase" do you mean? A Comment? A value? also, can you have > a notifiction sent to you when a date on a spreadsheet has expired? Maybe you can apply an open event (date to be tested being say in F1): Private Sub Workbook_Open() If Range("F1") < Date Then MsgBox "Date expired" End If End Sub Regards, Stefi ...

Sum amount if = 2 value's
I have a spreadsheet of payment types for which I want to sum the tota amount per type per month A B C Type Amount Month I'm able to get the total amount per type by usin =SUMIF(A:A,"TYPE",B:B), but can't work out how to get a total for eac type each month Somthing along these lines: =SUMIF((A:A,"TYPE",B:B)&C:C,"MONTH")) ???? Any idea's -- loscherlan ----------------------------------------------------------------------- loscherland's Profile: http://www.excelforum.com/member.ph...

Need Help with drop down list with conditions...
I need help. I'm having a very difficult time creating a sequence of list which change based on the item selected on the main list, lets call it the index: The Index list, the first list, would define vendors. In this case Hotel Companies (e.g Hilton, Marriott, Sheraton). The following list, the 2nd list, would define properties, but the properties would vary based on which hotel company is selected (e.g. If Hilton, then "The Plaza, the Waldorf Astoria. If Marriott, then Marriott Marquis, Marriott Convention Center etc etc...) on list #1. And Last but not least, the 3rd list would...

Excel pivot table #2
i encountered an error in my pivot table. i created an olap cube using the analysis manager. the cube displays the correct data of my measures but on my pivot report, it displays #N/A.... i need help to fix this one... thanks.... =) ...

Outlook Express 6 Spell Check #2
I am using Outlook Express 6 on Windows XP, and I have a problem with spell check. When you send an email, it says "spell check has been haulted, do you want to send anyway" and if I ask it to spell check, it says an error has occured in spell check. All my spelling options are correctly set, so I don't know what the problem is. Kimberly McNabb <knmcnabb@hotmail.com> wrote: > I am using Outlook Express 6 on Windows XP, and I have a > problem with spell check. Ask in an Outlook Express newsgroup. -- Brian Tillman ...

Database #2
Hi I'm new to Outlook. I hear of an Outlook database in other threads. Is this synonymous with the ..pst or .ost files people mention? Does it corrupt often and if so are there tools to repair it? Regards Craig. There's a utility called ScanPST.EXE that will scan and attempt to repair the file. Yes, typically when a user says Outlook database they're referring to their PST file "Craig Roberts" <craigroberts@jkr.co.uk> wrote in message news:C4C8E141.211DE%craigroberts@jkr.co.uk... > Hi > > I'm new to Outlook. > > I hear of an Outlook d...

unique with 2 columns
I have 2 columns with duplicates in the first column and no duplicates in the second. I neeed to only see one value for each in the left and only one of the accounts from the right. ie: abc 1234 abc 12345 bcd 251 eft 600 eft 607 I would like to see either of the abc with the 1234 or 12345 I would like to see the bcd since it's individual with the 251 I would like to see either of the eft with the 600 or the 607 Use a totals query and one of the aggregate functions (First, Last, Min, or Max) on the...

host unreachable #2
hi, if i send a email with a wrong address or mispelled it, i don't get a message that the address, destination is wrong until 4 days later after being deletedj from the outgoi queue im using E5,5 sp4 thks Is that for all domains, even for Yahoo and Hotmail? Rick wrote: > hi, > > if i send a email with a wrong address or mispelled it, i > don't get a message that the address, destination is wrong > until 4 days later after being deletedj from the outgoi > queue > > im using E5,5 sp4 > > thks ...

Excel number formatting #2
I receive spreadsheets with separate columns of numbers and text. The problem is that the numbers column is not in number or general format (when sorting behaves like text). Is there a way to turn those columns into numbers (except stepping into each one separately)? When I just highlight the number in the cell and hit enter, the cell automatically becomes numeric (I'm looking for a more global solution). Thanks, A You can do this: 1. Type 1 (the number 1) into a blank cell. Highlight this, select Edit, Copy. Now highlight entire column(s) that you want changed to numeric, and sel...

Closing Excel #2
I have inherited an App desigend by an ex employee Sometimes the program leaves Excel in the task manager The programe uses various routines and calling various functions that define Excel sheets etc (badly named) I'm finding it hard to follow (my 1st experince of .NET) is there a way to KILL any Excel instence when exiting the program. I have come across some posts about GC (garbage collection) like this System.Runtime.InteropServices.Marshal.ReleaseComObject(oXLWsheet) oXLWsheet = Nothing 'System.Runtime.InteropServices.Marshal.ReleaseComObject(oXLWs) oXLWs = Nothing oBook.Clos...

hidden transactions #2
I have a problem with account balances: the balance for checking is way off on the hiome page than in the account register view. When I tried to find out why, I got some greyed out transaction when I went from bill schedule through right click to payee. This transaction cannot be changed or deleted, but in total all such transactions made up the difference in balance. Any suggestions? Oscar -- Elvart In microsoft.public.money, elvigor wrote: >I have a problem with account balances: the balance for checking is way off >on the hiome page than in the account register view. When I ...

Stats/PivotTables #2
I have to produce stats from data exported as a CSV file from a piece of custom made software we use here. The data displayed in Excel looks like this: 01/04/2003 05:31 Dr JESSICA STROUDLEY 01/04/2003 08:56 Dr JESSICA STROUDLEY 01/04/2003 11:16 Dr JESSICA STROUDLEY 02/04/2003 11:42 Dr JESSICA STROUDLEY 02/04/2003 05:31 Dr JESSICA STROUDLEY 02/04/2003 08:56 Dr JESSICA STROUDLEY 03/04/2003 11:16 Dr JESSICA STROUDLEY 03/04/2003 11:42 Dr JESSICA STROUDLEY I have to produce a spreadsheet saying how many examinations were done by a particular doctor over a certain timespan. Each date li...

How did I break the cell display limit? #2
If there is anyone out there who can help with this, I would be most most grateful. Here's the facts: - I'm working in a MS Excel worksheet. - I am aware of Excel's 255-character-per-cell display limit. (As understand it, each cell can hold up to 32,000 characters, but wil only display/print 255 characters.) This is a major pain in th petunski, as most of my cells contain more than 255 characters Therefore, most of my spreadsheet shows cells that look like this ###############. I have to look in the formula bar to see the actua contents of each cell. - In cell C35, I have 1,05...

OWA Setup Questions #2
Hi All, I am attempting to install the newly released owaadmin tool. My IIS server currently hosts 3 websites all of which are published to their own urls via host headers all of the sites are using ssl. When Installing the owaadmin tool, it creates a new "Default Web Site" as the orginal "Default Web Site" has been renamed. The new "Default Web Site" contains only the files and path names pointing to "%systemroot%\Program Files\Outlook Web Access Administration" what I am doing is removing this new "Default Web Site" site using the I...