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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum fields with condition

Status
Not open for further replies.

fredong

IS-IT--Management
Sep 19, 2001
332
US
I am trying to SUM totalsale by certain vendor by creating a formula call @CertainVendorsTotal

below is my syntax and I appreciate if someone can help me. Thanks.

Sum({sp_rpt_Vendor;1.InvTotal}, ({@CertainVendorsTotal} in ["HHH",KKK","GGG"]))



sp_rpt_Vendor is a store procedures name

 
Use a Running Total, and in the evaluate use a formula place:

{table.field} in "HHH",KKK","GGG"}

-k
 
Slight correction to SV's formula for the running total evaluation area (I think the brackets didn't get processed correctly when posted):

{table.vendor} in ["HHH",KKK","GGG"]

You might also be able to create a formula for the detail section like:

if {table.vendor} in ["HHH",KKK","GGG"] then {table.amount}

Then insert a summary on the formula at the group level.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top