AnsweredAssumed Answered

Sub Summary calculation with IF statement?

Question asked by bnmohr on Feb 4, 2015
Latest reply on Feb 4, 2015 by philmodjunk


Sub Summary calculation with IF statement?


My situation is somewhat like this thread:


I am tracking audio signals through sound systems.  If I filter and sort lists of Signals, I can get a report of Devices with the following breakpoints


Device::Name/Model etc


1  Signal Name

2 Signal Name


1 Signal Name

2 Signal Name

3 Signal Name

4 Signal Name

Next Device Name/Model...

What I want is for each location, to to summarize the total number of inputs, and the total number of outputs.  I have the summarry field sInput Count that is the count of record ID's which properly sums the inputs but also the outputs for each device, however if I try to total those summaries at the "Input/Output" breakpoint, it's summing all of them together (both inputs and outputs)- what I want is a sum IF Input Output Flag="Input" and another sum IF = "Output"


My current solution is to convert the Input Output Flag text field into two number fields cIsInput and cIsOutput which is just the evaluation ="Input" or ="Output" and then total those fields at the end.  It works, I was just hoping there was a more elegant way to do this based on the sub summary lines.  In hind sight I should have defined the input/output flag as a number field knowing it would eventually end up in a calculation.