Alteryx Designer Desktop Discussions

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

Mapping Files

Simon1187
9 - Comet

Hi there,

I have a mapping file and several other files. I want to change the names of variables based on the mapping file. In the 2016_original_data, we have the original variables. Now, I want to rename these variables according to the mapping file.

The mapping file contains five columns: dataset_name, variable_old, value_old, variable_new, and value_new. If variable_new in the mapping file is null, then we want to remove that variable from the 2016_original_data file.

If variable_new is not null, then we want to replace variable_old in the file with variable_new from the mapping file. If the value in sex (variable_old) equals 0, then replace it with 1; if the value in sex (variable_old) equals 1, then replace it with 0.

Could you please let me know how to achieve this?

 

Thanks, 

Simon

1 REPLY 1
aatalai
14 - Magnetar

@Simon1187 you need dynamic rename, I've done something and attached it below. 

 

I was a bit confused when you say "If the value in sex (variable_old) equals 0, then replace it with 1; if the value in sex (variable_old) equals 1, then replace it with 0." 

 

so ignored it

 

hope it helps

Labels
Top Solution Authors