LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Operation between rows

    Employee
    Posted 07-09-2014 08:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rakhi

    Is there a way of doing calculation between rows, for example if I have the following field and values:

    field1, field2
    10,22
    33, 40
    55, 66

    and I want to subtract the value of field2(22) of row 1 with value of field1(33) row 2 and result should display as below.

    Field1, field2, temval, diff
    10, 22, 22, null
    33,40,40,11
    55,66,66,15

    Thanks in advance.


  • 2.  RE: Operation between rows

    Employee
    Posted 07-09-2014 08:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rakhi

    Please help me, its very urgent for me.


  • 3.  RE: Operation between rows

    Employee
    Posted 07-09-2014 09:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Put this into a filter node:


    if firstExec then Prev_Value = null
    emit Field1, Field2
    emit Diff = Prev_Value-Field1
    Prev_Value = Field2


    The trick is to set the value of Prev_Value AFTER you do the emit(s)