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

Multi-Row Not Functioning: Increment Row Based on Previous Value When Null

linlysergel
7 - Meteor

I have a dataset where I'd like to increment the value by 1 in the column "Box" based on the previous value when it is not null.  I've tried using a Multi-Row Formula tool with the parameters listed below, but the result is always still a null value.

 

Update Existing Field:  Box

Num Rows: 1; Set Values to Closest Valid Row (also tried NULL and 0 or Empty)

No Grouping

Expression:  if isnull([Box]) then [Row-1:Box]+1 else [Box] endif

 

I've also checked that the Box column is a Double type, not sure what else I'm missing!  Thanks in advance for any ideas you might have!

 

 

Current Data Set

BoxDateTypePriceShares
9252021-12-01RSU Tax Shares518.9816,992
9262021-12-10RSU Tax Shares513.229
9272021-12-31RSU Tax Shares538.12783
[Null]2022-01-03RSU Tax Shares537.95216
[Null]2022-01-04RSU Tax Shares523.85163
[Null]2022-01-06RSU Tax Shares523.851,236

 

Outcome Needed:

BoxDateTypePriceShares
9252021-12-01RSU Tax Shares518.9816,992
9262021-12-10RSU Tax Shares513.229
9272021-12-31RSU Tax Shares538.12783
9282022-01-03RSU Tax Shares537.95216
9292022-01-04RSU Tax Shares523.85163
9302022-01-06RSU Tax Shares523.851,236
3 REPLIES 3
mbarone
16 - Nebula
16 - Nebula

Formula looks fine, and it tests fine for me.  Can you screenshot your configuration, maybe throw a select tool before the multitool to make sure it's a numeric type?  

linlysergel
7 - Meteor

I clearly need to sleep more!  I just realized that I was only looking at the input side of the tool, not the output.  Everything is working now and thanks for looking at it!

binuacs
20 - Arcturus

@linlysergel as @mbarone mentioned your formula is correct. can you check your configuration against the one provided? 

 

binuacs_0-1659546388485.png

 

Labels