report calculation

G

Guest

I have a report footer to "sum" the "Amount" field only if the the
corresponding line in "action" field reads "deposit" I used
Sum (IIf["Activity"]="Deposit", [Amount]) but it gives a pop up saying--
syntax error in querry expression 'First([Sum (IIf["Activity"]="Deposit",
[Amount])])'

I dont understand what it is saying , Please help
 
G

Guest

Try

=Sum (IIf[Activity]="Deposit", [Amount], 0))

You had
Sum (IIf["Activity"]="Deposit", [Amount]) )

I removed the quote from the Activity, and added a 0 if the Activity is not
Deposit
 
G

Guest

yes it gives the calculation but bit funny. let me explain, report looks like
this


name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum (IIf[Activity]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)

Please help>>>>




Ofer Cohen said:
Try

=Sum (IIf[Activity]="Deposit", [Amount], 0))

You had
Sum (IIf["Activity"]="Deposit", [Amount]) )

I removed the quote from the Activity, and added a 0 if the Activity is not
Deposit

--
Good Luck
BS"D


senkurion said:
I have a report footer to "sum" the "Amount" field only if the the
corresponding line in "action" field reads "deposit" I used
Sum (IIf["Activity"]="Deposit", [Amount]) but it gives a pop up saying--
syntax error in querry expression 'First([Sum (IIf["Activity"]="Deposit",
[Amount])])'

I dont understand what it is saying , Please help
 
G

Guest

someone interested to help !!!
please help

senkurion said:
yes it gives the calculation but bit funny. let me explain, report looks like
this


name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum (IIf[Activity]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)

Please help>>>>




Ofer Cohen said:
Try

=Sum (IIf[Activity]="Deposit", [Amount], 0))

You had
Sum (IIf["Activity"]="Deposit", [Amount]) )

I removed the quote from the Activity, and added a 0 if the Activity is not
Deposit

--
Good Luck
BS"D


senkurion said:
I have a report footer to "sum" the "Amount" field only if the the
corresponding line in "action" field reads "deposit" I used
Sum (IIf["Activity"]="Deposit", [Amount]) but it gives a pop up saying--
syntax error in querry expression 'First([Sum (IIf["Activity"]="Deposit",
[Amount])])'

I dont understand what it is saying , Please help
 
G

Guest

sorry, I used the formula as suggested
Sum ((IIf[Action]="Deposit", [Amount], 0))
senkurion said:
someone interested to help !!!
please help

senkurion said:
yes it gives the calculation but bit funny. let me explain, report looks like
this


name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum (IIf[Activity]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)

Please help>>>>




Ofer Cohen said:
Try

=Sum (IIf[Activity]="Deposit", [Amount], 0))

You had
Sum (IIf["Activity"]="Deposit", [Amount]) )

I removed the quote from the Activity, and added a 0 if the Activity is not
Deposit

--
Good Luck
BS"D


:

I have a report footer to "sum" the "Amount" field only if the the
corresponding line in "action" field reads "deposit" I used
Sum (IIf["Activity"]="Deposit", [Amount]) but it gives a pop up saying--
syntax error in querry expression 'First([Sum (IIf["Activity"]="Deposit",
[Amount])])'

I dont understand what it is saying , Please help
 
G

Guest

You need to create a new field in your detail section that would be
IIF([Action]="Deposit",[Amount],0). I would add the new field to the record
source of the report. This way you don't have to include it in the detail
section. Then in the report simply sum the new field -- SUM([Expr1]).

senkurion said:
sorry, I used the formula as suggested
Sum ((IIf[Action]="Deposit", [Amount], 0))
senkurion said:
someone interested to help !!!
please help

senkurion said:
yes it gives the calculation but bit funny. let me explain, report looks like
this


name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum (IIf[Activity]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)

Please help>>>>




:

Try

=Sum (IIf[Activity]="Deposit", [Amount], 0))

You had
Sum (IIf["Activity"]="Deposit", [Amount]) )

I removed the quote from the Activity, and added a 0 if the Activity is not
Deposit

--
Good Luck
BS"D


:

I have a report footer to "sum" the "Amount" field only if the the
corresponding line in "action" field reads "deposit" I used
Sum (IIf["Activity"]="Deposit", [Amount]) but it gives a pop up saying--
syntax error in querry expression 'First([Sum (IIf["Activity"]="Deposit",
[Amount])])'

I dont understand what it is saying , Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top