Alteryx Designer Desktop Discussions

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

Regarding dynamically select column without its name

ashiques
8 - Asteroid
In Input we have 9 Column by which we have to make out put. So the formula for making new column is sum of last three column's divide by 3. But the main concern is that my input files  doesn't have any fixed number of column's. So i am unable to give the column name.

So i have to do this dynamically. So i don't want to use the formula like "A" = (F6+F7+F8)/3.
So pls give me suggestion what i can do here by which i get last three column dynamically without the name give hard coded.
 i saw a tool dynamic select which is relevant in which there is a Field called [FieldNumber]. How can i use this if it can be helpful.

 
3 REPLIES 3
AdamR_AYX
Alteryx Alumni (Retired)
Take a look at this for a solution

+
I use a field info tool to get the field names.
Then a sample to get the last three field names.
The recordId adds a new field which I will use to rename the last three fields using the Dynamic Rename tool.
Now my last three fields have names I know ([1], [2] and [3]) I can write the formula I want.
Then use a final Dynamic Rename tool to put the field names back to what they were originally.

Hope that does what you wanted. 

You can download the module here http://downloads.chaosreignswithin.com/community/SumOfLast3FieldsDiv3.yxmd

Adam

 
Adam Riley
https://www.linkedin.com/in/adriley/
ashiques
8 - Asteroid
Thanks for your commect. Its very helpful for me.
ashiques
8 - Asteroid
Thanks for your comment. Its very helpful for me.
Labels