Alteryx Designer Desktop Discussions

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

Dynamic field name in a filter expression

Nmetzgen1
8 - Asteroid

Hi all,

 

I have created a macro that creates numbered fields based input rows. The new fields are named 1, 2, 3, 4 etc.  as the number of new columns depends on the input data the 'name' of the last field is variable.

periodsalesproduct
110A
211A
313A
223B

 

converts to

product123
A101113
B 23 

 

The formula i need to add creates a new field based on value in last field added. (to determine is a product range is discontinued) in the case where only four columns are created, the filter expression is  '[3] > 0'. how can i add in a filter that has an expression '['x'] >0' where x is the name of the last field added

 

product123status
A101113active
B 23 discontinued

 

kind regards

 

Nicholas

3 REPLIES 3
MSalvage
11 - Bolide

@Nmetzgen1,

 

Kind of hacky, but I think the attached workflow does what you are looking for. Probably a more elegant way of doing this, but this was the first way that popped into my head.

 

Hope it helps,

MSalvage

danrh
13 - Pulsar

Another option :)

image.png

 

Nmetzgen1
8 - Asteroid

Thank you both for your help!!

Labels