Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Multi-Field Formulas

lmaughan
7 - Meteor

Looking for some help with the Multi-Field Formula tool in Alteryx.  I am trying to apply a calculation to multiple columns.

 

Example:

Data is structured in columns.  I need to calculate (multiply by 0.5) to get 50% of the value listed in each column.

IDDescriptionABCDEF
74521Mickey M.500500500500500500
72673Minnie M.1000250060044001200300
77342Goofy1004206401200346232
75932Donald D.141032408226422410360
74385Daisy D.100100100100100100

 

I am expecting the following result:

IDDescriptionABCDEF
74521Mickey M.250250250250250250
72673Minnie M.50012503002200600150
77342Goofy50210320600173116
75932Donald D.70516204113211205180
74385Daisy D.505050505050

 

Can someone help me with the syntax on how to configure the tool for this type of result?  I am new to this tool, and would appreciate the help.

Thanks!

 

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @lmaughan I mocked up a workflow let me know what you think?

 

Multi_Field_26032020.JPG

lmaughan
7 - Meteor

Perfect!  I just needed a little help and this was spot on!

 

Thanks for your quick response.  Much appreciated.

lmaughan
7 - Meteor

Is it possible to SUM all the rows together and create a new row?  Ultimately I would like to add all the rows together before using the multi-field formula.  I would use the Summarize tool, but I have to manually add all the columns, which in my real world data is a lot.  Just looking for another way to sum all the numeric rows into a single row on multiple columns of data.

 

grossal
15 - Aurora
15 - Aurora

Hi @lmaughan,

 

I am not sure if I got that right, but you want to build the sum of all columns BEFORE dividing them by 2? If not, just use the outgoing connection after the Multi-Field Tool for the Transpose Tool.

 

grossal_0-1585406347904.png

 

I used @JosephSerpis workflow as a base and fixed the Multi-Field Tool because it was also dividing the ID column.

 

What happens:

1) Transpose Tool to shift all columns into rows

2) Select Tool to fix data type (I don't know why they were not recognized as numbers)

3) Summarize Tool for the sum

4) Join to bring everything back together

 

Workflow attached.

 

Best

Alex

Labels