Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Sum in Report

Status
Not open for further replies.

Jovix

Programmer
Dec 3, 2003
39
US
Hello,

lets say I have two columns, one has a Cost Type such as MaterialCost, ShippmentCost, LaborCost, etc... and the other column contains the actual cost amount for that cost type. Can I Sum the CostAmount column based on criteria from the CostType Column. For example.

I would like to sum only the LaborCost Amounts.

If I were to write this out in code it might look like this.

Sum CostAmount WHERE CostType = LaborCost

or

IF CostType = LaborCost then
Sum CostAmount
End IF

Thanks in Advance
J

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top