I have a report grouped by account number and I am trying to return any years with an amount value less than zero, and return the previous year and value. I can get the the year and value less than zero, but I need help in bringing back the year prior to the year with the negative value and the value for that year.
In the example below, I would like to return 1982 -1.05 and 1981 9.66.
Example:
Account Number Year Value
12345
1984 8.65
1983 5.22
1982 -1.05
1981 9.66
1980 7.35
Tahnk you for any help.
In the example below, I would like to return 1982 -1.05 and 1981 9.66.
Example:
Account Number Year Value
12345
1984 8.65
1983 5.22
1982 -1.05
1981 9.66
1980 7.35
Tahnk you for any help.