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

Multi Row - Add Specific ID into NULL

Jocelyn1
6 - Meteoroid

Hi, I imported 3 reports to Alteryx, named A, B and C respectively and all of them is starting from different ID. 

The example is shown below.

Report A starts from 400 to 404;

Report B do not have ID;

Report C starts from 100 to 103.

 

I would like to manually add ID for Report B (perhaps the ID starts from 1 to 6) so that later I could join it with other table. I guess Multi-Row Formula might help but I don't know how to write the formula out.

 

ReportID
A400
A401
A402
A403
A404
B 
B 
B 
B 
B 
B 
C100
C101
C102
C103

 

Appreciate if anyone could help me on this. Thanks!!!

3 REPLIES 3
grossal
15 - Aurora
15 - Aurora

Hi @Jocelyn1,

 

here is a quick way to do this:

 

grossal_0-1587915490986.png

 

 

Result: 

grossal_1-1587915505690.png

 

 

Formula:

IF isnull([ID])
THEN [Row-1:ID]+1
ELSE [ID]
ENDIF 

 

Workflow attached. Let me know what you think.

 

Best

Alex

Jocelyn1
6 - Meteoroid

Hi @grossal ,

 

Thank you for your quick response.

 

If the max number ID for Report B is only up to 3, means I would like it to start from 1 again after 3. Do you have any idea how to write the formula?

 

ReportID
A400
A401
A402
A403
A404
B1
B2
B3
B1
B2
B3
C100
C101
C102
C103
grossal
15 - Aurora
15 - Aurora

sure @Jocelyn1!

 

Here is an update version:

 

IF not isnull([ID])
THEN [ID]
ELSEIF [Row-1:ID] = 3
THEN 1
ELSE [Row-1:ID] + 1  
ENDIF 

 

I added another condition in the Formula to handle the extra rule.

 

Updated workflow attached 😃

 

Alex

Labels