### Title

Calculation based on results obtained at total time.

### Post

How is it possible to accomplish the following calculation?

(Total A) minus (Total B) = (Total C)

If (Total C) is positive, post it in column (c)

If (Total C) is negative, post it in column (d)

To phrase this problem differently, how are calculation performed at 'Total Time'?

Thank you for your help!

Dave Adams

That would depend on how Total A and Total B are computed/displayed and whether they represent a grand total or a sub total.

If Total A and Total B are summary fields and you need Total C to be a grand total not a sub total:

Total C:

Let ( T = Total A - Total B ;

If ( T > 0 ; T )

)

Total D:

Let ( T = Total B - Total A ;

If ( T > 0 ; T )

)

If your are needing a sub total in a sub summary layout part, you an use Get Summary functions in the part of the expressions that compute a value for T to get sub totals instead of grand totals.

And in other set ups that do not use summary fields to compute totals, you'll need to first describe those calculations before I can suggest a way to get what you want though the above examples may provide you with the needed clue.