Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Designer| Dynamic rename of field using another field's first row of data

Mj9715
8 - Asteroid

Hi All, 

 

I have a dataset like below - my goal is to change the field name "Col B" needs to be changed to "27-Sep" i.e., first row of data from another field. 

 

How do I use dynamic rename for this? Can someone guide please? 

 

Col A Col B 
27-Sep123
27-Sep122

 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Mj9715 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1632814819048.png

 

1. Using select tool to get 1st row.

2. Using transpose to get column name and value.

3. Using multi-row formula tool to set new name to Col B.

4. Using dynamic rename to rename the headers.

 

Hope this helps : )

AngelosPachis
16 - Nebula

Hi @Mj9715 

 

In your data, do you have other records with dates under Col B? So something like the table shown below?

 

Col A Col B 
27-Sep123
27-Sep122
30-Sep159
30-Sep160

 

If yes, what do you want to do with this extra rows? Also how do you want ColA to be renamed?

 

Thanks,

Angelos

Mj9715
8 - Asteroid

@AngelosPachis - Col A consists of a single date., i.e.,only 27-Sep for eg. 

 

Col A name can be retained as is. However, the data corresponding to the date contained in column A (i.e., daily file) needs to be Col-B's field name. 

AngelosPachis
16 - Nebula

Thanks for your reply @Mj9715 .

 

Here's how you can use the dynamic rename tool to rename column B based on the values of col A.

 

AngelosPachis_0-1632816230768.png

Hope that helps,

Angelos

Labels
Top Solution Authors