Alteryx Designer Desktop Discussions

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

Multi-Row Formula producing negative numbers

dsouthh
7 - 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? 

2 REPLIES 2
JohnJPS
15 - Aurora

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

dsouthh
7 - Meteor

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

Labels