0
+--------+------------+-------+-------+------+---------------+----------+--------+
| LOGSYS |   MATNR    | PLANT | LBKUM | Week | QTY_WITHDRAWL | PLUS_QTY | Output |
+--------+------------+-------+-------+------+---------------+----------+--------+
| SAP    | 1234567890 |  1234 |  1511 |   06 |           578 |      676 |   1609 |
| SAP    | 1234567890 |  1234 |       |   07 |          1334 |     2080 |   2355 |
| SAP    | 1234567890 |  1234 |       |   08 |          1826 |     1600 |   2129 |
| SAP    | 1234567890 |  1234 |       |   09 |          1786 |     1920 |   2263 |
| SAP    | 1234567890 |  1234 |       |   10 |          1445 |     1120 |   1938 |
| SAP    | 1234567890 |  1234 |       |   11 |           990 |      800 |   1748 |
+--------+------------+-------+-------+------+---------------+----------+--------+

I want last column 'Output' as stated in table. here the logic is :
for row 1 : LBKUM + plus_qty - qty_withdrawl
for row 2 : output of row 1 + (plus_qty-qty_withdrawl) of row 2
for row 3 : output of row 2 + ([enter image description here][1]plus_qty-qty_withdrawl) of row 3

and so on.

I am not able to add an excel file here....so just adding an image. I hope it would be sufficient.

Thanks in advance.

APC
  • 144,005
  • 19
  • 170
  • 281
Vinod
  • 25
  • 4
  • [Please do not upload images of code/data/errors.](//meta.stackoverflow.com/q/285551). Post your data as text into your request instead. You can use a formatter to get it pretty. E.g.: ozh.github.io/ascii-tables with setting "Github markdown". – Thorsten Kettner Feb 13 '23 at 15:56
  • Please post your sample data as a text table (or as `insert` statements) and show the output you want for this sample data – astentx Feb 13 '23 at 15:59

0 Answers0