Hi,
I wish to turn below input data to the CSV/tab delimited form as mentioned under output. Issue is that Campaign name is not fixed size(words).
<input data>
Marketing Campaign Name
Email List Subscribers Jan 2020
Beauty Customers Feb 2020
Spring Sale March 2020
Product Category Campaign April 2020
Loyal Customer Campaign May 2020
Summer Sunshine June 2020
<output data>
Marketing Campaign Title | Month | Year |
Email List Subscribers | Jan | 2020 |
Beauty Customers | Feb | 2020 |
Spring Sale | March | 2020 |
Product Category Campaign | April | 2020 |
Loyal Customer Campaign | May | 2020 |
Summer Sunshine | June | 2020 |
I think i can achieve it by using looping condition.. something like below:
month = campaign's last second word
year = campaign's last word
For(words in Campaign; words < campaign's last second word; next word)
Marketing _campaign_title = campaign title + words
I wish i have something like "Multi-Row-Formula" which can access words in a phrase of the current record and append them so that in the following hops text can me converted to columns.
Thanks..
P.s, I love the Alteryx community.. amazing responses and well structured.. great learning.
Solved! Go to Solution.
Hi @psoma ,
Would the below work for your needs? It's a Regex tool with a formula that parses the Marketing Campaign field. Let me know what you think!
P.S. I'm new to using Regex, so it's possible there's a way to write this statement more elegantly!
This is the shortest I can make the regular expression (using the Regex tool set to Parse),
(.*) (\w+) (\d+)
But @kelsey_kincaid method works just as well.
Hi @psoma,
@kelsey_kincaid posted just faster than me. I had the same solution using the more generic formula in RegEx of (.*)\s(.*?)\s(.*) with the same results. I agree RegEx is the best approach.
Thanks for the quick responses. RegEx works like charm.
P.s I was consumed by loop option.