Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to replace existing text in different format in certain column with some standard text

Shaopingfu
7 - Meteor

I want to remove exiting text in column "Text", and input the formatted text with below conditions-
1) for line items having Offset vendor code started with "E", the test should be - "Pay T&E" + name in column- Offset vendor description + Year (yyyy) Month (mm) per column - Posting Date
2) for line items having Offset vendor code started with non- "E", the test should be "Pay” + code in column- Offset vendor

2 REPLIES 2
Zok
8 - Asteroid

Hello

 

One way of doing this

Zok_1-1679309492283.png

 

Zok_0-1679309483962.png

 

binuacs
21 - Polaris

@Shaopingfu Another approach with STartsWith function()

IIF(StartsWith([Offset vendor], 'E'), "Pay T&E " + [Offset vendor description] + DateTimeFormat([Posting Date],'%Y%m') ,'Pay ' +[Offset vendor])

binuacs_0-1679309947562.png

 

 

Labels
Top Solution Authors