Jump to content

groups and difference between successive rows


bartvh

Recommended Posts

Is it possible to retrieve in a variable, the value of a field for the 'next' row?

Let me make this a bit more clear with an example. Suppose we have the following data:

A B
1 5
1 7
2 12
2 18

 

I would like to show a report as follows:

Group 1:   5 -> 12 = 7

Group 2: 12 ->(null) = (null)

Total: 7

The idea is to group on A, and each time show the start value of B, and the end value of B. The difficulty is that I do not want the last value of B in the current group, but the value for the next group. I also want the difference between these two values, and a total difference. (notice that the end value for the last group will be undefined, because there is no next value.)

I have managed to create a text field with evaluation type Now that shows the correct end value of B, but I cannot do the same in a variable (as I want to calculate difference, and calculate a sum). Is there any way to achieve this result? 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...