Alteryx Designer Desktop Discussions

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

Data Propagation

skmarsh
5 - Atom

My input status column looks like this:

Status

n

n

y

y

y

n

n

y

n

n

 

I want the output status column to look like:

Status

y

y

y

y

y

y

y

y

n

n

 

The logic is if there is a 'y' in the subsequent rows after 'n', the 'n' should be converted to a 'y'. How can I do this?

Please note this is just one example, the number of 'y's and 'n's can change. 

4 REPLIES 4
binuacs
21 - Polaris

@skmarsh one way of doing this with the record id tool

image.png

skmarsh
5 - Atom

Hi that was really helpful! Thankyou!

One thing I forgot to mention is that I have to do this for each policy number(unique key). The above example was for one policy number. How do I group on the basis of policy number and then use the above workflow?

 

My input looks like:

PN  Status

1      n

1      n

2      n

2      y

2      n

 

ntakeda
12 - Quasar

Hi, @skmarsh 

 

I will attach the workflow, please check it.

Step 1: Reverse the order.
Step 2: Group by PN, and if the lower value is "y," change "n" to "y."
Step 3: Restore the original order.

 

2025-03-10_17h01_59.png

 

skmarsh
5 - Atom

Thankyou so much! 

Labels
Top Solution Authors