Alteryx Designer Desktop Discussions

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

How to create a new column?

LeoMessi
7 - Meteor

Hello!

 

I want to add a new column in my dataset, using transaction date in DDMMYYYY format, and transform it into YYYY-0001 format. A sample is below:

Transaction DateNew Column
19/7/20222022-001
13/8/20212021-002
8/2/20202020-003

 

Thank you!

7 REPLIES 7
Felipe_Ribeir0
16 - Nebula

Hi @LeoMessi 

 

One way of doing this

 

Felipe_Ribeir0_0-1669043958713.png

 

DavidSkaife
13 - Pulsar

Hi @LeoMessi 

 

Here is a way of doing it using DateTime formula and a Record ID. Firstly create a record ID field in string format, specifying the length of the field, then parse the date into standard ISO format, format so it's only the year, and finally add the record ID to it:

 

DavidSkaife_0-1669044293248.png

 

ShankerV
17 - Castor

Hi @LeoMessi 

 

One way of doing this!!!

 

ShankerV_0-1669044686178.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @LeoMessi 

 

Input:

ShankerV_0-1669044718495.png

 

Output:

 

ShankerV_1-1669044733407.png

 

 

Shanker V

 

DenisZ
11 - Bolide

Please see attached workflow, hope it helps

 

DenisZ_0-1669045053366.png

Feel free to mark it as solved if it solves the issue.

 

ShankerV
17 - Castor

Hi @LeoMessi 

 

Step 1: Input

Step 2: Record ID tool

 

ShankerV_0-1669044792914.png

 

Step 3: Regex tool

 

ShankerV_1-1669044814957.png

 

 

Step 4:

ShankerV_2-1669044827039.png

 

Kindly accept this solution if it provided a solution to your question.

 

 

Many thanks

Shanker V

 

 

LeoMessi
7 - Meteor

Thank you, everyone!

 

Your respective solutions worked for me!!

Labels