### Title

calculated field in Grand Total Summary

### Post

I have a sub-summary report the breaks on 2 parts.

The first part is all positive values

The second part is all negative values.

Each record has a field called COUNT that holds a value of -1 or +1

I have a calculated field called GrandTotalText that looks at sum(count) and if that total is negative, GrandTotalText says "Total Loss".... same for gain. See below.

Case(Sum(count)=0;"No Gain or Loss:";

Sum(count)>0;"Total Gain:";

Sum(count)<0; "Total Loss:")

My problem is that no matter what sum(count) is, GrandTotalText ALWAYS says "Total Loss:"

Got any ideas?

Thanks

You need a summary field in order to summarize a found set. The Sum() function (and other aggregate functions) summarizes mainly related records and repeating fields.

Once you have defined a summary field as Total of count, you can use it in your calculation instead of Sum(count).