Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
8 - Asteroid

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
8 - Asteroid

Looks like this might work for what I need:

Solved: Column referencing - Alteryx Community

Labels
Top Solution Authors