3 Replies Latest reply: May 1, 2015 1:42 AM by Daniel Oberbillig RSS

    Help with script for data selection

      Good night everyone!

       

      I am working in a bank table with debit and credit entries and the calculation of balance. This part is ready and works perfectly. I need help to load in the script column "flag" to select the current balance value of the day. When more than a launch on the same day is the difficulty begins, since I can not add up all the results of the balance of this day, I need only the last daily balance record. below is an example of the table.

       

      Already much I appreciate the attention of everyone who can help me. Best regards.

       

      I need all the current balance records every day, but when one day presents more of a release on the same day, takes only the last record of the day, highlighted below.

       

      IdSequential

      Date

      Bank

      Balance

      Flag

      142004

      31/12/2014

      39

      R$        500,00

      1

      242006

      02/01/2015

      39

      R$        400,01

      1

      342009

      05/01/2015

      39

      -R$        599,98

      0

      442009

      05/01/2015

      39

      -R$    1.498,98

      0

      542009

      05/01/2015

      39

      -R$    1.597,98

      1

      642010

      06/01/2015

      39

      -R$    1.697,88

      0

      742010

      06/01/2015

      39

      -R$    1.797,78

      0

      842010

      06/01/2015

      39

      -R$  11.797,67

      0

      942010

      06/01/2015

      39

      -R$  11.897,57

      1

      1042012

      08/01/2015

      39

      -R$ 111.797,561

      0

      1142012

      08/01/2015

      39

      -R$ 211.797,55

      1

      1242016

      12/01/2015

      39

      -R$ 211.895,55

      1

      1342018

      14/01/2015

      39

      -R$ 211.995,45

      1

      1442020

      16/01/2015

      39

      -R$ 221.995,44

      0

      1542020

      16/01/2015

      39

      -R$ 231.994,44

      1

      1642023

      19/01/2015

      39

      -R$ 232.994,43

      0

      1742023

      19/01/2015

      39

      -R$ 233.094,33

      0

      1842023

      19/01/2015

      39

      -R$ 233.193,33

      1

      1942026

      22/01/2015

      39

      -R$ 333.192,22

      0

      2042026

      22/01/2015

      39

      -R$ 343.192,21

      0

      2142026

      22/01/2015

      39

      -R$ 443.192,20

      0

      2242026

      22/01/2015

      39

      -R$ 443.291,20

      0

      2342026

      22/01/2015

      39

      -R$ 453.281,19

      1