Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Dynamically Add Column

ashiques
8 - Asteroid
Hi all,

I have a table in whcih i have many column's but i want to make a new column in "Fract" which is sum of all "A_Fract" Column's.
Currently there are 6 Column names starting with "A_Fract" but in future there will be more "A_Fract".
So is there any way to Make a new column "Fract" with all column sum which start with "A_Fract" without giving its full name.


Thanks in Advance
3 REPLIES 3
AdamR_AYX
Alteryx Alumni (Retired)
I think this will do what you want


Add a record ID.  Transpose your data.  Filter all fields that start "A_Fract".  Summarise, grouping by RecordID and summing value which creates your new field "Fract".  Then join back to your original data.

You can download my example module here downloads.chaosreignswithin.com/community/SumFract_Columns.yxmd

Adam


 
Adam Riley
https://www.linkedin.com/in/adriley/
ashiques
8 - Asteroid
Thanks for the help.
ashiques
8 - Asteroid
Hi Adam Riley,
When i used this Formula
IF left([Name], 7) == "A_Fract" THEN left([Name], 7) == "A_Fract" ELSE left([Name], 11) == "B_Analytics" ENDIF

Then i got both the values of "A_Fract" and "B_Analytics". How can i get only one value.
Like i first find "A_Fract" then if its not found then find "B_Analytics". I didnt get the one value.


 
Labels