Free Trial

Alteryx Designer Desktop Discussions

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

Multi-Row Formula Help

jalizmaldonado
8 - Asteroid

Hi, I'm working on creating a payment schedule but need assistance with the following formula:

 

IF [Pay Schedule]= "Pay Date" THEN 0 ELSEIF IsNull(Holiday) THEN [Row-1:Payroll Count Down]+1 ELSE 0 ENDIF

Instead of zero, am I able to skip a row and continue the count? 

 

jalizmaldonado_0-1624388873154.png

 

3 REPLIES 3
apathetichell
19 - Altair

Your problem with using a 0 is that you rest the count. the easiest way to change:

IF [Pay Schedule]= "Pay Date" THEN 0 ELSEIF IsNull(Holiday) THEN [Row-1:Payroll Count Down]+1 ELSE 0 ENDIF

 

is to  keep the previous value and not increment it - that would be replacing the zero with  [Row-1:Payroll Count Down]

 

That's not going to work though - it seems like you want the row after paydate to be 10 and then countdown from there? Is that right? that's a different formula if it is.

 

See if that gets you what you want.

SPetrie
13 - Pulsar

One way I can think of is to use a record Id and then sort descending. (I find it easier to count up than to count down).

Use this as the multi row formula. 

If IsNull(Holiday) and isNull([Pay Schedule])THEN [Row-1:Payroll Count Down]+1 ELSEIF !isNull([Pay Schedule]) then 0 else [Row-1:Payroll Count Down] ENDIF

Sort by record ID again but as ascending this time so its back in original order and you are done.

It doesnt set the Holidays to be 0, but that would be easy to do with a formula tool after the fact.

 

Qiu
21 - Polaris
21 - Polaris

@jalizmaldonado 

How about we seperate the holidays then go with your logic then joining back with main data stream.

Capture2A.PNG

 

Labels
Top Solution Authors