We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

how to skip first row in multi row formula

Sshasnk
8 - Asteroid

I have a dataset and I want to skip the first row and subtract the one which is above

Example:

value
12
13
23
56

Output:

valuenew value
1212
131
2310
5633

 

So skip the first row and put the value which is in the value column, for the rest of the row subtract the value above ex 13 -12 = 1 and 56-23 = 33

1 REPLY 1
Emil_Kos
17 - Castor
17 - Castor

Hi @Sshasnk,


This is the multirow formula that you should try:

 

IF !isnull([Row-1:value]) THEN [value]-[Row-1:value]ELSE [value] ENDIF

 

I have created a workflow for you:

 

Emil_Kos_0-1611223485183.png

In order to make it work I needed to remember to keep this option:

 

Emil_Kos_1-1611223525100.png

 

Labels
Top Solution Authors