How to compare a value in the current row with a value in the previous row?
Posted on 2006-11-30
In my report, I want to report on the numeric difference between two values in order to show the delta. For example:
Month 1: 35 widgets Delta: Unknown
Month 2: 15 widgets Delta: -20
Month 3: 17 widgets Delta: +2
Month 4: 22 widgets Delta: +5
Can I create a formula in Crystal that will do this? (I suppose I need to store the previous row's widget count as a variable, so I can then compare it with the current row's count.) I also need to handle--as the example shows--the first row that won't have a previous row for comparison.