Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to reference a column dynamically by referencing another column

PaladinKnight
6 - Meteoroid

So, I am trying to tell alteryx to perform a calculation on a column to the left a column. The reason is because the column I have does not have a title but the column on the right of it does. Hence, I need to ask Alteryx to keep the column on the left of the column I reference, see below.

 

Input 

 

Name 2020  Number of fruits 
Orangeother dataother  dataother  data501 
Grapeother  dataother  dataother  data102 
Pearother  dataother  dataother  data203 
Strawberryother  dataother  dataother  data304 

 

Output

NameWeight 
Orange50
Grape10
Pear20
Strawberry30

 

The number of columns between "Name" and "Number of Fruits" will vary between tabs, but the one thing that stays the same is that I need to reference the column to the left of the column titled "Number of Fruits" and keep that column. I cannot simply use a static reference because the position of the column to the left of the column titled "Number of Fruits" will change but it will be the column to the left every time. 

 

How can I tell the program to do this? Trying to do this without a Macro, any advice would be appreciated.

 

 

 

1 REPLY 1
binuacs
21 - Polaris

@PaladinKnight One way of doing this

image.png

Labels