community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Multi-Row Formula producing negative numbers

Meteor

I have a list of N records (only 1 field) and am dividing the (N+1)th record by the Nth record for all N>1. For N = 1, I set the value to 1. Here is my expression:

 

IF [Field1] = 1  THEN [Field1] = 1 
Else [Field1]/[Row-1:Field1] ENDIf

The output is correct except all the numbers are negative. Any ideas why? 

ACE Emeritus
ACE Emeritus

THEN "[Field] = 1" produces -1, since [Field] does not equal 1.  Just put [Field] there.  :-)

Meteor

Keep forgetting phrases like that evaluate as booleans. Thank you!

Labels