Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Dynamic Field update using mapping file

hanz_e
6 - Meteoroid

Hello Everyone,

 

I have a data which looks like this

 

NameAgeCountryPay1Pay2Pay3Pay4Pay5Pay6Pay7
Jacob23UK4367.4734685.263598.761234.589845.674756.8754635.67
William31USA87458.677647.76356276.8773846.568728.7687348.7887248.78
Kumar27India7246.64 93748.8723674.8745984.8783748.7723763.8
Mazood24UAE6728.7825753.9834875.98 87348.9823672.98236724.9

 

I want calculate a new set of fields using a mapping sheet

 

Standard NameClient Data
CandidateName
AgeAge
NationCountry
Salary1Pay1+Pay4+Pay5
Salary2Pay2+Pay6
Salary3Pay3
Salary4Pay7

 

I am trying to create an Alteryx app which will calculate the Salary fields from the mapping sheet and the combination of Pay fields might change from case to case, and then I have to use these Salary fields for further calculation.

 

So could you please help me to create a workflow which reads the combination from the mapping sheet and then dynamically calculate the Salary fields?

 

Thanks in Advance!

7 REPLIES 7
danilang
19 - Altair
19 - Altair

Hi @hanz_e 

 

This should get you started

 

danilang_0-1622293800593.png

Split your mapping table into 2.  The first one has the field rename info.  Just add new records to this to map new client fields to the standard ones.  This mapping table is used by a Dynamic Rename tool to standardize the field names.

 

The second table contains formulas.  These need to be in the same format as if you entered them in a formula tool, i.e. [Pay1]+[Pay4]+[Pay5].  These are used in the Dynamic Replace tool which is set up to act in formula mode.  It evaluates each of the formulas using the data in each of the rows to give you the results

 

danilang_1-1622294179099.png

 

Dan

 

 

Qiu
21 - Polaris
21 - Polaris

@hanz_e 
If it is pure addition, we can also do this.

0529-hanz_e.PNG

vizAlter
12 - Quasar

@danilang - Awesome method! 👍

atcodedog05
22 - Nova
22 - Nova

I can agree with you on that @vizAlter.

 

@danilang - Awesome method! 🙂👍

 

Always something new to learn


 

shreyanshrathod
11 - Bolide

Hi, 

 

I see that your query has been resolved, but still wanted to attempt it because it's an interesting one.

 

shreyanshrathod_0-1622310635261.png

 

 @danilang , I'm a fan of yours. Always something to learn from you!!!

Regards,

Shreyansh Rathod

 

Qiu
21 - Polaris
21 - Polaris

@danilang @hanz_e 


Maybe you can consider to submit this as a weekly challenge idea?

Myself still not get better with the Dynamic Replace tool. 😁

atcodedog05
22 - Nova
22 - Nova

Hi @Qiu 

 

As i remember there was a weekly challenge which had usage of dynamic replace but it had been a really long while🤔

Labels