Alteryx Designer Desktop Discussions

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

How to Parse below sample data?

ankush-agrawal
7 - Meteor

Hello All,

 

Please see attached sample data which needs to be parsed.

 

Requirement: To assign financial Year

 

For eg: A data which contains "S5312_Wapiti Cost_jan'21" as Description.

I need to extract "21" from the description and based on this create a column which will have the value next to it as "FY2021".

 

Let me know if you need additional details.

 

 

4 REPLIES 4
messi007
15 - Aurora
15 - Aurora

@ankush-agrawal,

 

Please see below :

 

messi007_0-1659682513512.png

 

Attached the workflow,

Regards,

ankush-agrawal
7 - Meteor

Thank you so much for your help. I applied the solution to original data and most of them works. However, I have few exceptions, which I have added in snapshot and also in the excel, can you see if there is any solution?

 

Also, do you mind to explain

1) how this formula is only picking up last 2 characters? even though there are 4 digit characaters somewhere like 2021.

2) How this formula is picking up numbers from middle of the text as well?

messi007
15 - Aurora
15 - Aurora

@ankush-agrawal,

 

I'm not a regex expert below the best what I can do with the data set :

 

I added a comment to the attached workflow to give you more explanation.

I use often the website below where you can find more details about regex expressions : https://regex101.com/ 

 

messi007_0-1659689982371.png

 

Hope this helps !

 

Regards,

ankush-agrawal
7 - Meteor

Thanks I will work on it for the rest.

Labels