# Alteryx Designer Discussions

Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

## CurrentFieldName and IF ELSE statement with calculations added in Multi - field formula

Highlighted
7 - Meteor

Hi All:)

There are 50 columns in my data (A,B,C.......ZY) and then each one has to be multiply by 1 of another 50 column with different coefficient (A_M, B_M, C_M.....ZY_M).

I know I can do this easily using Formula and creating one new column with multiplication at the time , but I bet there is a better way:)

I just wonder if something like this is possible with Alteryx with Multi - field formula action on multiple column at the same time.

IF [_CurrentFieldName_]==[A] THEN ([A]*[A_M])
ELSEIF [_CurrentFieldName_]==[B] THEN ([B]*[B_M])
ELSE [_CurrentFieldName_]==[D] THEN ([D]*[D_M])    etc. for each of 50 columns .....
ENDIF

Thanks!:)

Highlighted
Alteryx Certified Partner

Hey Justyna,

I'm not sure if this is possible using the multi-field formula tool, but I have created a workflow that allows you to produce your desired result without writing all the calculations.

It may need amending slightly for your specific use case mind :)

See attached.

Ben

Highlighted
16 - Nebula

I liked @BenMoss method. I think the Dynamic Replace can also be used, so I thought I would post it here as well. The dynamic replace is very under used so I'm trying to see what kinds of problems it can solve.

Highlighted
16 - Nebula

I did something similar to @BenMoss - but instead of using field names, split the data by field position and then rejoined it back together (columns in the first half join with columns in the second half).

Very much enjoyed @patrick_digan solution - I've seen these tools lurking in the toolbox, but never had a good excuse to use most of them - so this is a great example to learn from.

@JustinJ- if @BenMoss or @patrick_digan 's solutions solved your problem, would you mind marking this as solved?   If you still have questions - feel free to post them back on this thread (possibly with some of the data you're working with so that we can post a solution that exactly meets your needs).

Cheers

Sean

Highlighted
7 - Meteor

Thank you very much! :)

I wouldn't find this solution myself.

I will  take a look when solve another issues with my workflow....

Labels