Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Adding New Columns with Company Name

Divyajyothi7
8 - Asteroid

Hi

  • I have two datasets: co1 and co2.
  • In co1, there is a hierarchical relationship between parent and child records.
  • I have last child record in co1.
  • Once you have identified the last child record, you want to continue the data from co2 and create a new column called "co".
  • Sample data for co1 and co2 has been added with workflow.

 

Input :

 

od t_miod t_siod t_qat_sit_qat_si2t_qa2t_si3t_qa3t_si4t_qa4t_si5t_qa5t_si6t_qa6t_si7t_qa7t_si8t_qa8t_si9t_qa9
SD001SD0221SD1220.23SD0990.33SD4000.66  SD1230.11SD1240.22SD1250.44SD2110.55  
SD077SD0880.33SD2330.55SD1990.55SD4330.77SD5440.88SD2340.56SD2350.34SD2360.55SD2370.56SD2382
SD077SD1880.23SD4440.55SD1990.22SD5440.88  SD9110.1SD1111SD1021    

 

 

Expected Output:

 

od t_micood t_sicood t_qat_sicot_qat_si2cot_qa2t_si3cot_qa3t_si4cot_qa4t_si5cot_qa5t_si6cot_qa6t_si7cot_qa7t_si8cot_qa8t_si9cot_qa9
SD001111SD0221111SD1221110.23SD0991110.33SD4001110.66   SD12311330.11SD12411330.22SD12511330.44SD21111330.55   
SD077111SD0881110.33SD2331110.55SD1991110.55SD4331110.77SD5441110.88SD23411330.56SD23511330.34SD23611330.55SD23711330.56SD23811332
SD077111SD1881110.23SD4441110.55SD1991110.22SD5441110.88   SD91111330.1SD11111331SD10211331      
3 REPLIES 3
geraldo
13 - Pulsar

@Divyajyothi7 

 


An example workflow follows.

As Alteryx cannot have columns with the same name, the Co column was unique. If the example works, make the necessary adjustments

binuacs
21 - Polaris

@Divyajyothi7 Another approach, 

binuacs_0-1685544638992.png

 

flying008
15 - Aurora

Hi, @Divyajyothi7 

 

Another way by MM-Formula only for reference, but not recommend.

 

录制_2023_06_01_10_59_14_104.gif

Labels
Top Solution Authors