Alteryx Designer Desktop Discussions

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

Date mapping help when reading in a directory

wonka1234
10 - Fireball

Hi,

 

I have the following dataset being read from directory tool:

 

FullPath
\\This\is_a_test\so\please\help\me\or else ill be sad\Final_202210.del
\\This\is_a_test\so\please\help\me\or else ill be sad\Final_20221031.del
\\This\is_a_test\so\please\help\me\or else ill be sad\Final_202211.del

 

how can I map the Final_202210 file to always be the 20221031 file?

 

When I use an if statement to convert it to 20221031 both files are still being read in the filter tool.

 

Not sure if a sample tool (select 1) would work here incase there are multiple dates in the filter

 

Please help!

 

expected output:

 

\\This\is_a_test\so\please\help\me\or else ill be sad\Final_20221031.del
\\This\is_a_test\so\please\help\me\or else ill be sad\Final_202211.del
4 REPLIES 4
Adriankp
8 - Asteroid

If you group by FullPath in a summarize tool after renaming the 202210 file it should get rid of the extra row and only load the file once.

wonka1234
10 - Fireball

@Adriankp  no that doesnt seem to work.  The dynamic input tool would be reading the FullPath files.

Adriankp
8 - Asteroid

You would have to replace the incorrect date in the FullPath column as well.

 

You could do it like this, by separating the path and filename, changing the date value, and then combining them back together. You could also write a longer expression to do it all in one single formula.

 

 
 

image.png

 

dwstada
10 - Fireball

like this maybe?

 

did I understand correctly that you only want the latest file for each month?

Labels