September 11, 200817 yr Newbies looking to get a total for a field (Expense Amt) when sorted by a field (Accounting Code ="C27"). c27 is the the code text input into the field "Account Code". After I get the format with this, I will do this for Account Code A01-A03, B01-B08, C01-C30, and thru D08-D05. None of the following seem to work. Please advise. If((Accounting Code)="C27"),Sum(Expense Amt) If(Accounting Code = "C27",Sum (Expense Amt),0) If((Accounting Code)="C27",Extend(Expense Amt),0) GetSummary(Expense Amt,(Accounting Code)="C27") Sum (Expense Amt) , If (Accounting Code ="C27")
September 11, 200817 yr Assuming that you are using this as a calc in a calc field I would use the following:- Case((Accounting Code)="C27",Sum(Expense Amt),0) This would return the sum of expense amount if acc code = c27 or 0 otherwise. You can put as many other conditions as you would like to check for into the same calc and just leave the 0 at the end as the default eg: Case(Accounting Code ="C27",Sum(Expense Amt),Accounting Code ="C28",Sum(something else),0) The above should be placed in an unstored calc field with the result of number and it shouyld give you what you want hth Phil
September 11, 200817 yr You can use a summary report to do this. If you need to see it in browse mode, you can use GetSummary but you still need to create a summary field that totals your number, which you will need to reference in your GetSummary. P.S. also remember to sort it by the break field which is your Accounting Code field. Edited September 11, 200817 yr by Guest Added PS
Create an account or sign in to comment