Alteryx Designer Desktop Discussions

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

Want to remove Date pattern from Field Names

ferha_jafri
8 - Asteroid

Hello Experts,

 

I have a scenario in which monthly files get loaded from client with the date in few columns, so I want to made them independent of dates. So that the formulas depend on the field names should not be  impacted. PFA with the sample data.

 

Thanks in advance

4 REPLIES 4
messi007
15 - Aurora
15 - Aurora

@ferha_jafri,

 

If the columns are always on the same position you can use the option below:

 

messi007_0-1622116698948.png

and then use the select tool to rename then create your formulas

 

messi007_1-1622116746904.png

 

Hope this helps,

Attached the workflow,

Regards

mceleavey
17 - Castor
17 - Castor

Hi @ferha_jafri ,

 

I've built this using a bit of regex magic (regex is my friend).

 

mceleavey_2-1622117952770.png

 

 

mceleavey_1-1622117943136.png

 

Hope this helps.

 

M.

 

 

 



Bulien

danilang
19 - Altair
19 - Altair

Hi @ferha_jafri 

 

Using @mceleavey's regex magic, but without the Transpose/Crosstab combo, which is a very expensive pair of operations if you have lots of data.

 

danilang_0-1622118470847.png

 

This workflow operates only of the field names, so it will always take the same amount of time, no matter how many rows in the dataset.  It uses the Field Info tool (one of my favorites) to extract the column metatdata, modifies that and then renames the original columns using a Dynamic Rename.

 

One thing to note is that after the conversion you have multiple fields with the same name.  Alteryx renames them for you, but you might want to look at renaming them to something like [Net Assets (Current)] and [Net Assets (Prev)] to avoid ambiguity in your workflow

 

Dan 

  

vizAlter
12 - Quasar

@ferha_jafri — Try this solution using RegEx tool:

 

(at|[(\s]\d{1,2}\/\d+\/\d+[^(])

 

vizAlter_0-1622121263323.png

vizAlter_1-1622121277889.png

 

Hope this helps!

Labels