Alteryx Designer Desktop Discussions

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

Referencing a column name via a reference shortcut in Formula tool

terrence10
7 - Meteor

Hello,

 

I am trying to reference a column based on a user input when running the Alteryx app.

 

I have setup a "date" text input that saves into Question.Date and Question.DatePrev

     Question.Date = '2023-04-30'

     Question.DatePrev = '2023-03-31'

 

 

Attached is a sample of my data

Alteryx Column.PNG

 

 

 

 

 

In my Formula field, I want to calculate Newfield =  [2023-04-30] - [2023-03-31]

 

Is there any way I can reference these columns using the reference shortcut "%Question.Date%" syntax in the formula tool? User date input will determine what columns are used for subtraction:

e.g. Newfield = [%Question.date%] - [%Question.dateprev%].

 

Would like to keep in this table format and avoid transposing my data / multi row formulas / then cross tabbing data again. Thanks!

1 REPLY 1
terrence10
7 - Meteor

Looks like this might work for what I need:

Solved: Column referencing - Alteryx Community

Labels