Hello,
I have created a app aiming at treating a test each 6 months: each year, one test for January - June, another test for July - December.
So i'd like to have a "drop down" tool to select the test:
For example, if we choose "1er semestre", then we will import all files named JAN, FEB, MAR, APR, MAY, JUN
And if we choose "2eme semestre", we will import all files named by other 6 months.
I'm curious if anyone has a easier way to not to repeat the same action 6 times? Because now my flow seems like really ugly...............
Thanks a lot.
Gelöst! Gehe zu Lösung.
Sometimes I make my workflows "dumber" in order to accomplish things like this. First I would create a new field that numbers the months so they're in order. 01-Jan, etc (could use a lookup table for this). Then, using either a lookup table or a formulaic filter, I would just tell Alteryx if 1-6 then semester 1 else semester 2. If you need portions of those semesters it's not too hard to make a lookup table that has fields for 12 mo, 9 mo, 6 mo, etc.
I actually was just struggling with this using Tableau and finally decided it's faster to just do it the old fashioned way... make a date table and then make fields like Last 12 wks (Y/N), Last 4 weeks (Y/N).
While it builds my skills better to try to figure out a way to do this stuff programmatically, as @JohnJPS has done, if you're in a time crunch, I find it sometimes helps to make things less automated.
@JohnJPS and @cbridges beat me to it, but I just added a text input tool to handle the translation and used a dynamic input to read all the files. I passed the output filename as a variable.
This is assuming that all your input files have the same column names, otherwise you will get all the columns in all your outputs (which would have nulls). If you have different column names, a batch macro which housed the input and output would work. Hope it helps!
I think @patrick_digan takes the best elements of both my and @cbridges comments, and builds them into the final answer. Nicely done!
Excellent answer help a lot, thank you very much!
It makes sense to keep things stupid instead of making everything automated. In fact, finally i kept my same workflow repeated to my test, even it is a little bit ugly.
You know what, as a chinese i find sometimes automation will reduce the employment rate and that's why china have powerful technique but we try keep things in manual, such as the gas station, supermarkets
Thanks for your best idea to sepreate my flow from 2 parts!