Alteryx Designer Desktop Discussions

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

Simple Multi Row Question

Jeff13
6 - Meteoroid

This should be simple question for this group. My data is below. If the current row's ID is the same as the next row's ID, and the Age1 = Y, I need the next rows Age1 field to be a Y. The second set of data below is what I need with the red values getting changed. I tried a few variations with the multi row formula and all have been unsuccessful

 

Thanks in advance.

 

 

ID Age1
30 N
31 N
65 Y
65 N
86 Y
86 N
167 Y
167 N

 

Here is what I need

ID Age1
30 N
31 N
65 Y
65 Y
86 Y
86 Y
167 Y
167 Y

4 REPLIES 4
binuacs
20 - Arcturus

@Jeff13 One way of doing this

binuacs_0-1675898342023.png

 

PhilipMannering
16 - Nebula
16 - Nebula

@binuacs , I think you just need,

 

IIF([Row-1:Age]='Y', 'Y', [Age])
ShankerV
17 - Castor

Hi @Jeff13 

 

As mentioned by @PhilipMannering , his formula also works.

 

One more way of doing this as per the logic explained when current row's ID is the same as the next row's ID.

 

IF [ID]=[Row-1:ID]
THEN "Y"
ELSE [Age1]
ENDIF

 

ShankerV_0-1675922248242.png

 

Many thanks

Shanker V

 

Raj
14 - Magnetar

if the logic is by referring the previous row 

then you can use 

IIF([Row-1:Age]=' Y', 'Y', [Age])

else if the logic is different then you need to add different condition

Labels