Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Referencing Relative Columns a Formula

bcirka
6 - Meteoroid

Scenario:

  • I have a data set with a fixed set of ID numbers in column A.
  • When my flow runs, numbers are captured in column C.
  • When my flow runs again, the new numbers are captured in column C, and the old numbers are, by implication, shifted to column D.
  • So every time I run the flow, a new set of values are captured in Column C, and the old snaps push continously to the right.

 

Here's the problem.  In column B, I'd like to have a formula to calculate the difference between Column C and Column D.  Is there any way to reference the RELATIVE columns C and D, rather than having to use a fixed header name within the formula tool?

 

Thank you!

 

Input:

Project IDLatest DeltaSnap 2-3-23Snap 2-2-23Snap 2-1-23
ABC3037
DEF4269

 

5 REPLIES 5
binuacs
20 - Arcturus

@bcirka Can you provide a sample input file and expected output ?

bcirka
6 - Meteoroid

Added a table that illustrates what I'm looking for.  

 

Delta column is what I'm trying to calculate with the 1st and 2nd column to the right of it.

 

Every time I run my flow, a new column drops in and pushes the other columns to the right.  That part works fine.

ArtApa
Alteryx
Alteryx

Hi @bcirka - You can configure your Input Data and Output Data to achieve a desired outcome:

ArtApa_0-1675479083699.png

 

Then your delta will always be F4-F3:

 

ArtApa_1-1675479151623.png

 

ArtApa
Alteryx
Alteryx

@bcirka - Alternatively, you can do something like this:

 

ArtApa_0-1675481469772.png

 

bcirka
6 - Meteoroid

That worked perfectly.  I then joined my delta column back to my original data set to get exactly what I was looking for.

 

Can't thank you enough!

Labels