Re: =Sum(Abs([field]="Value")*[Field]
- From: "Duane Hookom" <DuaneAtNoSpanHookomDotNet>
- Date: Tue, 25 Jul 2006 20:19:04 -0500
You have a table of [Final Action] values with an additional field for
[ApplyCost] which stores 0 for all records other than "Approved", "Pending",
and "Obligated". These three records contain a 1 in the ApplyCost field.
Then add this table to your report's record source and join the [Final
Action] fields. Your final expression then becomes:
=Sum([Tuition Cost] * [ApplyCost])
Maintain tables, not expressions.
--
Duane Hookom
MS Access MVP
"gumby" <david.isaacks@xxxxxxxxxxx> wrote in message
news:1153870842.261652.260300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to sum [Tuition Cost] but only if [Final Action] equals either
Approved, Pending, or Obligated. The control source below works fine. I
am just interested to find out if a easier way exists.
=Sum(Abs([Final Action]="Approved")*[Tuition Cost])+Sum(Abs([Final
Action]="Pending")*[Tuition Cost])+Sum(Abs([Final
Action]="Obligated")*[Tuition Cost])
Othe ways I have tried.
=Sum(Abs([Final Action]="Approved" And "Pending" And
"Obligated")*[Tuition Cost]
=Sum(Abs([Final Action]="Approved" And [Final Action]="Pending" And
[Final Action]="Obligated")*[Tuition Cost]
Thanks,
David
.
- References:
- =Sum(Abs([field]="Value")*[Field]
- From: gumby
- =Sum(Abs([field]="Value")*[Field]
- Prev by Date: Re: Create macro which automaticallly creates PDF of a report
- Next by Date: Re: Tool to map data on top of County based map?
- Previous by thread: =Sum(Abs([field]="Value")*[Field]
- Next by thread: Re: What does the search key not found in any record mean?
- Index(es):
Relevant Pages
|