Now that it's live, don't forget to accept your certification badge on Credly today! Learn more here.

Alteryx Designer Discussions

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

Creating multiple difference columns from existing columns

trorvig
5 - Atom

I have two years of data in one file and need to create difference columns. Below is a simple display of the data I have. I am looking for a way to dynamically create columns such as 'Expense Difference' that will be able to calculate the difference of the two columns based on the name of the field, in this case having 'Expense' in their name. My actual dataset has 30-40 fields for each year and the fields have the same name year over year other than starting with 2018 or 2019. 

 

Difference Columns.JPG

 

 

4 REPLIES 4
JordyMicheal
11 - Bolide

Hi @trorvig 


Sounds like the formula tool will be your new best friend.

Try starting here maybe

 

Capture.JPG

JoeS
Alteryx
Alteryx

Got myself confused with the first post.

 

What you want is the Dynamic Formula from the CReW macros.

 

I have used it and attached a workflow that should give you the basics of what you need:

 

Workflow.png

cplewis90
13 - Pulsar
13 - Pulsar

Hey @trorvig,

 

Here is a workflow that may do what you are looking for. This workflow would be dynamic and look for additional metrics as they are added to the data.

Dynamic Metrics.PNG

trorvig
5 - Atom

I was hoping to avoid adding 37 expressions in a formula tool manually but this definitely would solve my problem!!

Labels