Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Increment Values in Field for Null Values

John_Teh
5 - Atom

Hello,

 

I am having an issue incrementing values in my ID field. Is there a way to increase my Row ID in a single by one for each (and only) Null Values? 

 

Example:

 

Row Id

Null

Null

1

2

3

 

 

I'd want to fill 4 and 5 for the null values. I also want to do this with a formula tool. The formula I'm using in the formula tool is IF [Code]=Null() THEN [Code] = Max([Code], 1)
ELSE [Code] ENDIF but it doesn't seem to work. Does anyone have an idea to solve this?

 

Thanks.

1 REPLY 1
DavidP
17 - Castor
17 - Castor

So there's a couple of things to note.

 

- You have to determine Max RowID first - I use a Summarize tool

- Then you have to create a counter for the Null rows - I used the Tile tool for this

- Now you can add the counter and Max RowID's together for the Null rows in the formula tool.

 

DavidP_0-1586845175138.png

 

Labels