Alteryx Designer Desktop Discussions

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

Adding based on dynamic number of columns

SDeora
7 - Meteor

Hi,

 

My data contains columns which are selected based on a dynamic input. There is a set of constant columns and then there are columns starting with a set of specific characters like "ABC" everytime (ABC01/AB02/AB03... ABC12).

 

Everytime the workflow runs it will have a different number of the "ABC" columns. I need a new column which will have the total of all values in "ABC" columns regardless of how many there are. 

 

I've attached examples of the data for your reference. Please help!! 

7 REPLIES 7
DanielG
12 - Quasar

Unless I am misunderstanding, can't you transpose the data, filter on the left 3 characters being ABC, then summarize them and you will have total of all ABC columns for use in other parts of your workflow.

 

 

 

Sorry.  Dont have access to Alteryx right now to build sample.

SDeora
7 - Meteor

Sorry... I need the total of values in the "ABC" columns and not the count. 

DanielG
12 - Quasar

Sorry I wasnt clearer.

 

I think I was too general in my comment.

 

Use the summarize tool and select "SUM" as the action and it will sum them up.

RolandSchubert
16 - Nebula
16 - Nebula

Hi @SDeora ,

 

I assume, in your sample you want to dd the columns starting with "HSL". I think, you could transpose columns to rows, use a filter tool to select the columns starting with the specified string, summarize these columns (now rows) and join them to your original data. I attached a sample workflow. What do you think?

 

Best,

 

Roland 

SDeora
7 - Meteor

Great!! thanks! 

DanielG
12 - Quasar

@RolandSchubert 

Thanks for posting a sample.  I was unable to when I explained the process earlier.

SF_
5 - Atom

Hi,

 

I have a similar problem but it's months in the columns and I want to sum YTD as Jan-Jun (as Jul-Dec is not available) but I want this to be dynamic. How can I then modify the workflow to accommodate this ?

Labels