Solved

Sum if Value is Over Zero

Posted on 2011-02-23
3
403 Views
Last Modified: 2013-11-05
I have a report with the column control source of this:

=IIf([HOURS]-[HoursRemainingDisplay]>0,[HOURS]-[HoursRemainingDisplay],0)

I need to sum that column on my report but only include the values that are over zero in that sum. What would the controlsource field for that be?

(see photo)
Right now where all the zeros displayed in this image are actually are actually storing negative values stored so I don't want them on the sum.


ee-sum.jpg
0
Comment
Question by:gcgcit
  • 2
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34963809
Just sum the expression.


=sum(IIf([HOURS]-[HoursRemainingDisplay]>0,[HOURS]-[HoursRemainingDisplay],0))

0
 

Author Comment

by:gcgcit
ID: 34963935
peter57r: I tried that but when I run the report I get a pop-up box asking for a parameter value for HoursRemainingDisplay and then the total is 0.00 when as you see by the screenshot it should be 37.15.
0
 

Author Comment

by:gcgcit
ID: 34963944
peter57r: Sorry I was making a mistake on my end that works!!! Thanks!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vba sql wild card passing in code 3 22
Dlookup MSACCESS 5 24
Create macro from runcode 30 24
Criteria for Date for DCount 4 17
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question