Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ltollesonPut the code below in a filter node. You might need to play around with the percentDiff calculation, but you get the idea. The key is setting a variable after the emit to save the value from the previous record.
if firstExec then
{
tempValue = 'field1'
percentDiff = null
}
if not(firstExec) then
percentDiff = ((('field1' - tempValue) / 'field1') * 100).round(-2)
emit *, tempValue, percentDiff
tempValue = 'field1'