Alteryx Designer Desktop Discussions

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

Switch the Dates based on MAX and MIN with NEW_IND

Ramcharan99
7 - Meteor

I want to swap column name based on dates MAX (END_DT,ENRL_THRU_DT) Should have starting with prefix ML_

and MIN (END_DT,ENRL_THRU_DT) Should have starting with prefix RI_  also need to use NEW_IND below are examples 

 

Appreciated for immediate solutions

Input :

IDNAMESTART_DTEND_DTENRL_FROM_DTENRL_THRU_DTNEW_IND
1A01-06-202201-05-202201-06-202201-05-2022Y
2B01-09-202201-10-202201-09-202201-12-2022Y
3C01-03-202201-07-202201-03-202201-12-2022Y
1A01-06-202201-12-202201-06-202201-12-2022N
2B01-09-202201-12-202201-09-202201-12-2022N
3C01-03-202201-12-202201-03-202201-12-2022N
4D01-01-202201-05-202201-01-202201-05-2022N
4D01-09-202201-10-202201-09-202201-10-2022Y
4D01-01-202201-05-202201-01-202201-05-2022N
5E01-04-202201-05-202201-04-202201-05-2022Y
5E01-09-202231-12-202201-09-202231-12-2022Y
6F01-06-202201-12-202201-06-202201-12-2022Y

 

Output :

RI_IDRI_NAMERI_START_DTRI_END_DTRI_ENRL_FROM_DTRI_ENRL_THRU_DTRI_NEW_INDML_IDML_NAMEML_START_DTML_END_DTML_ENRL_FROM_DTML_ENRL_THRU_DTML_NEW_IND
1A01-06-202201-05-202201-06-202201-05-2022Y1A01-06-202201-12-202201-06-202201-12-2022N
2B01-09-202201-10-202201-09-202201-12-2022Y2B01-09-202201-12-202201-09-202201-12-2022N
3C01-03-202201-07-202201-03-202201-12-2022Y3C01-03-202201-12-202201-03-202201-12-2022N
4D01-01-202201-05-202201-01-202201-05-2022N4D01-01-202201-05-202201-01-202201-05-2022N
5E01-04-202201-05-202201-04-202201-05-2022Y5E01-09-202231-12-202201-09-202231-12-2022Y
nullnullnullnullnullnullnull6F01-06-202201-12-202201-06-202201-12-2022Y
1 REPLY 1
ShankerV
17 - Castor

Hi @Ramcharan99 

 

If I am right, the above question looks similar to the post which has been already replied.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/SWAP-COLUMN-NAMES-BASED-ON-BELOW-DATES...

 

Could you please check and advise.

 

Many thanks

Shanker V

Labels