Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I have the following table below, and I need to create a counter as the column counter, idea is whenever you meet ID_CD_MOV = 11 despises this line and the previous and the counter applies the next column, the more the counter values accumulated by ID_DOC.
I'm waiting for a help, thanks
ID_DOC | ID_COD | ID_CD_MOV | DATE | VL | Counter |
80425774 | 13380 | 10 | 29/02/2012 | 1643,21 | 1 |
80425774 | 13380 | 10 | 23/03/2012 | 1643,42 | 2 |
80425774 | 13380 | 10 | 23/04/2012 | 1643,29 | 3 |
80425774 | 13380 | 10 | 16/05/2012 | 1447,87 | x |
80425774 | 13380 | 11 | 16/05/2012 | -1643,29 | x |
80425774 | 13380 | 10 | 22/05/2012 | 1643,29 | 4 |
1006283 | 215370 | 10 | 23/01/2013 | 143,66 | 1 |
1006283 | 215370 | 10 | 18/03/2013 | 146,06 | 2 |
1006283 | 215370 | 10 | 12/04/2013 | 145,72 | 3 |
See attached example
Thanks