Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Make the next 1 row true

andy_deg
5 - Atom

Hi Community!

 

I have a quick problem, which I am sure there is an easy answer for but I am struggling to get my head around multi-row formulae.

 

The situation is, I have got one true value in a list of false values, and I would like to make the subsequent 1 record true also.  Could anyone write me an expression to do this, or is there a simpler way to do this without the multi-row formula tool?

 

Thanks for your assistance in advance!

 

Andy

 

CURRENT FIELD VALUESDESIRED FIELD VALUES
FALSEFALSE
FALSEFALSE
FALSEFALSE
TRUETRUE
FALSETRUE
FALSEFALSE
FALSEFALSE
3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @andy_deg 

 

New field: DESIRED VALUES

 

IF [Row-1:CURRENT FIELD VALUES] = "TRUE" THEN "TRUE"

ELSE CURRENT FIELD VALUES ENDIF

 

CHEERS,

LordNeilLord
15 - Aurora

Hey @andy_deg 

 

I think Multi-Row is the only way to go here:

 

The formula will be something like:

If [CurrentField] = "FALSE" and [Row-1:CurrentField] = "TRUE" Then [NewField] = "TRUE" Else "False" Endif

 

Neil

andy_deg
5 - Atom

I was getting myself in a right muddle with the row-2 values also!

 

Thanks so much!

Labels