By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

HELP WITH REPORT TOTALS

P: n/a
Hello,

Can any one help me with the syntax to calculate the totals of a field? There
are three fields in the query; [XFER/ORDER] which contains the data "O" or "T",
the other [TOTAL LINES] which contains (total lines of "O" or "T") for a
specific [DATE]. I want to display in text boxes the sum of all total lines
while [XFER/ORDER]="O" and the same for [XFER/ORDER]="T". I have tried
=Sum([TOTAL LINES])(IIF([XFER/ORDER])="O",1,0))) but it didn't work.

Sample Data:
Date XFER/ORDER TOTAL LINES
8/9/04 O 50
8/8/04 T 15
8/5/04 O 12
8/3/04 T 5

REPORT:(This is what I want the syntax for please)
TOTAL LINES OF "O" = 62
TOTAL LINES OF "T" = 20

Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 10 Aug 2004 22:54:38 GMT, ki*******@aol.com (Kissi5559) wrote:
Hello,

Can any one help me with the syntax to calculate the totals of a field? There
are three fields in the query; [XFER/ORDER] which contains the data "O" or "T",
the other [TOTAL LINES] which contains (total lines of "O" or "T") for a
specific [DATE]. I want to display in text boxes the sum of all total lines
while [XFER/ORDER]="O" and the same for [XFER/ORDER]="T". I have tried
=Sum([TOTAL LINES])(IIF([XFER/ORDER])="O",1,0))) but it didn't work.

Sample Data:
Date XFER/ORDER TOTAL LINES
8/9/04 O 50
8/8/04 T 15
8/5/04 O 12
8/3/04 T 5

REPORT:(This is what I want the syntax for please)
TOTAL LINES OF "O" = 62
TOTAL LINES OF "T" = 20


Assuming this is for a report and that the totals is in a footer.

Then try this for the "O"s

Sum ( IIf ([ XFER/ORDER] ="O", [TOTAL LINES] , 0) )

And this for the "T"s

Sum ( IIf ([ XFER/ORDER] ="T", [TOTAL LINES] , 0) )

- Jim
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.