Alteryx Designer Desktop Discussions

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

Apply formula to dynamic number of rows and columns

tomcolli
5 - Atom

Hi,

I have a dataset where the number of columns and rows changes each time the workflow is run.

I need to apply a formula to each cell of this dataset - each entry has a multiplier and a variable number of "Data" columns. Each "Data" column needs multiplying by the multiplier in that row.

 

Example:

Input Data:

RecordMultiplierData Col 1Data Col 2Data Col 3Data Col 4
a210151020
b2.5201555
c210151020
d1201555
e525304030
f4201555

 

Output:

RecordMultiplierData Col 1Data Col 2Data Col 3Data Col 4Result Col 1Result Col 2Result Col 3Result Col 4
a21015102020302040
b2.52015555037.512.512.5
c21015102020302040
d1201555201555
e525304030125120200150
f420155580602020

 

So, .e.g for record E, each "Result" column is the equivalently numbered "Data" column multiplied by the multiplier for E (5).

 

Any help would be appreciated!
Thanks

4 REPLIES 4
binuacs
21 - Polaris

@tomcolli one way of doing this

image.png

aatalai
14 - Magnetar

@tomcolli look at the multi field tool, selecting the data columns

 

and then setting it to multplier*[current field]

Hope this helps

nagakavyasri
12 - Quasar

@tomcolli 

 

Screenshot 2024-02-23 162110.png

 

 

flying008
15 - Aurora

Hi, @tomcolli 

 

FYI.

录制_2024_02_26_11_02_41_392.gif

录制_2024_02_26_11_04_25_880.gif

Labels
Top Solution Authors