Alteryx Designer Desktop Discussions

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

Use column header as number within formula

TomNL
7 - Meteor

Hi all,

 

I have some columns named with a number (1, 2, 3, ...). Can I refer to the column name/number in a formula? An "easy" example would be something like [_CurrentField_]+[_CurrentField_]. So for column 1 it should result in 2, for column 2 it should result in 4. 

 

Thanks.

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @TomNL 

 

Yes you can. Answer is same

 

You can use Multi Field formula tool. Refer the link below.

https://help.alteryx.com/current/designer/multi-field-formula-tool.

 

Hope this helps 🙂

 

I will modify the workflow for you.

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @TomNL ,

 

Here is the modified workflow

 

Input:

atcodedog05_0-1601806032033.png

 

Output:

Add columns -

atcodedog05_1-1601806082271.png

Overwrite-

atcodedog05_2-1601806100348.png

 

By changing these options:

atcodedog05_3-1601806137733.png

 

Workflow :

atcodedog05_4-1601806167252.png

 

Hope this helps 🙂

 

If this post helps you please mark it as solution. And give a like if you dont mind😀👍

 

Here is a interactive lesson on the tool.

https://community.alteryx.com/t5/Interactive-Lessons/Multi-Field-Formulas/ta-p/424422

TomNL
7 - Meteor

Hi atcodedog05,

 

This helps a lot. As I needed the column number in all cells below, I use CurrentFieldname now, together wilt tonumber.

 

tonumber([_CurrentFieldname_])+tonumber([_CurrentFieldname_])

 

Thanks a lot.

 

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

Labels