Alteryx Designer Desktop Discussions

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

Create new field based on blank rows of separate field

eu123
5 - Atom

Hi, 

 

I have created a sample report for help on this issue. I am trying to create a NET NEW FIELD called "Last". A row can be considered "Last" if and only if the following row is blank. In other words, the letters in column E refer to the various steps, but there can be "A "number of steps or "N" number of steps. I need to find the LAST step which, again, is the last row before a blank.

 

I have tried using the multi-row formula with the following logic:

 

IF [row+1:Total Conversions] = "0"
THEN [Last] = "No"
ELSEIF [row+1:Total Conversions] = "1"
THEN [Last] = "Yes"
ELSE [Last]
ENDIF

 

The new column, "Last" is always returning 0's for every row in the file.

 

Does anyone know how to solve?

2 REPLIES 2
MSalvage
11 - Bolide

@eu123,

 

I have attached an example of a multi-row formula tool that should work.

 

IF [Row+1:Conversions] = 1 then 'YES'
ELSE 'NO'
ENDIF

 

I think you may have just had the syntax a little confused.

 

Best,

MSalvage

 

Aguisande
15 - Aurora
15 - Aurora

Hi @eu123

I think the problem you have is with the assignment ( [Last] = "No" should be just "No")

 

IF [row+1:Total Conversions] = "0"
THEN [Last] = "No" (should be just THEN "No")
ELSEIF [row+1:Total Conversions] = "1"
THEN [Last] = "Yes" (Should be just THEN "Yes")
ELSE [row-1:Last] (IF none, it assigns the previous row value of [Last])
ENDIF

 

Remember that the multi-row tool will assign automatically the value of the THEN clause to the Field name (variable) you created in its name.

 

Labels