6 Replies Latest reply: Nov 1, 2013 6:45 AM by Grant Rosenthal RSS

    How to use Exist() for generating Flag value 0/1 in script

      I have some data that looks like this;


      Desired output;

      Cost typeAmountActFlg
      Actual Cost Labor 175,054.00 1
      Actual Cost Travel00
      Projected Cost Labor   12,144.00 0
      Projected Cost Travel00
      Actual Cost Travel 100,000.00 1
      Obligated Cost Travel00
      Actual Cost Labor   30,058.27 1
      Projected Cost Labor00


      I want to generate a column like 'ActFlg' possibly using Exists since I'm evaluating the current row vs. previous.

      Here is what I have but its only generating 0 values.


      If(Exists([Cost Type]='Actual*'), 1, 0) AS ActFlg,


      Please help!