community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Generate rows - fill nulls

Meteoroid

Hi!

 

I have a problem where I have nulls in a column, and I need to fill the nulls based on certain rules.

 

The @ tracks will only ever be null, 1 or 2.  If the null, or multiple nulls, have a 1 and a 1 on either side of them, the output should be 2. Similarly, if the null(s) have a 2 either side, the output should be 2.

 

If the null has a 1 AND a 2 on either side of it, the result should be 1. Note that this needs to be done by account code i.e. the formula must only take into consideration all the # tracks within an account code. 

 

If there is a null at the very end or very beginning of an account code, the number selected (1 or 2) must be the most recent # tracks to the null. 

See below for a desired output as an example. I have attached this in excel.

 

Please help, I've been stuck on this for a while now!

 

Thank  you in advance!

 

clipboard_image_0.png

Pulsar

Hi @bwat2435 

 

I think a Multi-Row formula tool should solve your challenge, if I'm reading it correctly (if it's empty, then take the value from the row above).

 

image.png

 

To keep things within the same account code, tick off Account Code as a grouping level.

 

Let me know if that helps.

 

Cheers!

Esther

Meteoroid

Thank you Esther!!!

Labels