Here is the structure I am using:
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
v_CY =If([A]<>(First([A]) In Block);[CY])
v_LY =If([A]<>Last([A]) In Block;[LY])
Here is the result:
A
|
CY
|
LY
|
Diff
|
CM
|
LM
|
---|---|---|---|---|---|
A1
|
2.5
|
-2.5
|
6
| ||
A2
|
2.5
|
1.5
|
1
|
6
|
6
|
A3
|
3
|
3
|
6
| ||
Sum:
|
5.5
|
4
|