7 Replies Latest reply: Jul 20, 2016 4:58 AM by Joanna Seldon RSS

    peek or pervious when simular number

    Joanna Seldon

      hi

       

      I am trying to see if next number is lower than the next...but I am having issues when it sees the first number or next

       

      I have tried both expressions

       

      if((Sales)< peek(sales),'1','0') as flag

       

      if((Sales)< previous(sales),'1','0') as flag

       

      basically

       

      Month 1 , sales = 10     ...flag = 1

      Month 2,  sales = 9.8   ... flag = 1

      Month 3,  sales = 9.9  ....flag =  0

      Month 4  Sales = 9.9   ... flag = 0

      Month 5  Sales = 15   .... flag = 0

       

      how can I make Month 1 flag be 0?

       

      please help