5 Replies Latest reply on Nov 9, 2016 11:25 PM by xinyi.ng

    How to derive variable that gives first value for every category

    xinyi.ng

      Hi

       

      How do i derive a variable (value2) such that it will give the first value for every group?

       

       

      group

      value

      value2

      A

      1

      1

      A

      1

      0

      A

      1

      0

      B

      0

      0

      B

      0

      0

      C

      1

      1

      C

      1

      0

      C

      1

      0

       

      I tried this but it didnt work:

       

       

      { FIXED [group]: iif(FIRST()=0,value,0)}

       

      It gave me the aggregate non-aggregate error.