Conditional calculations in a report

csou5555

Registered User.
Local time
Today, 09:41
Joined
Feb 23, 2006
Messages
10
I have a report (based on a query) that generates a list of all the work projects completed within a user-defined date range, with all of the cost information associated with each project. In the report footer, I have a control that calculates the sum of all the projects on the report (control source "=Sum([totalcost])"). I now need to break this total into 2 fields, based on another field on the query/report , billable. I need to create 2 total cost fields, one for billable (billable="YES") and one for non-billable (billable ="NO) projects. How do I accomplish this? Can I do this on the report itself, or does it have to be part of the query? Any help would be greatly appreciated.
 
You could add some grouping to your report i.e. Group by Billable and Non Billable projects and in the Group Footer put in a control to subtotal the total cost of each type of project.

In your report footer you could leave the overall total.
 
Last edited:
=Sum(Iif([billable]="YES",[TotalCost],0))
 

Users who are viewing this thread

Back
Top Bottom