cancel
Showing results for 
Search instead for 
Did you mean: 

SUM conditional Field

Former Member
0 Kudos

Post Author: leedo

CA Forum: .NET

Hi,I am a bit lost here and need some help. I have the following fields in my report:- Called Number<Text>- Rate<Number>- Duration <Number> - Price<Formula> => Rate * DurationNormally to simply sum the "Price" field I'd write: =>SUM({Cost_report.Calls})However,

I need to create two Summary fields. Each one only sums a subset of the

the "Price" column based on a condition in the "CalledNumber" column as

follows:CalledNumber Price----


-


97184323 2.592343323 23.0084755543 30.583343321 8.094532234 10.5 Sum for only numbers that begin with 9==> 36.00Sum for only numbers that begin with 8==> 38.5Any ideas?!!!Please used VB Syntax if possible.Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Post Author: sarasew

CA Forum: .NET

Create two formula fields in your report with something like the following:

if {table.callednumber} startswith "9" then {table.price}else 0

and then sum the seperate fields up. (You can also accomplish this with running totals but by creating the formula fields you aren't limited to using the footer sections of your groups only)

Answers (0)