Alteryx Designer Desktop Discussions

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

Compare values based on a start date and end date

frostybuk
5 - Atom

I have a CSV file thats generated everyday and placed into a folder. The file name contains the date for the data.

I need to be able to compare two files, basically let a user input a start date and an end date, and be able to compare the differences between certain values from the start date and end date. I have a few conditions that I can mention if need be but my main goal is just to compare the files by the start date and end date. I've used the date tile but I'm having trouble with the Action tile not functioning the way that I would assume. 

Any examples or ideas on how you would do this?

2 REPLIES 2
AmalinaH
Alteryx
Alteryx

I would look into using Directory, Dynamic Input and Textbox interface tools for the user to input a start date and end date.

 

The user's input would then dynamically be able to select the two files from the specified folder, since the file names reference the date that's input by the user. This can be achieved by an action tool that replaces the date string within the file path or file name.

 

I would use a union to merge the two files. I would imagine with a few simple transform tools e.g. a cross tab function you would then be able to put the data from the two dates side by side to make comparisons.

 

AmalinaH_0-1655833421888.png

 

The Directory tool would need to be updated to the folder which contains the files.

ddiesel
13 - Pulsar
13 - Pulsar

Hi @frostybuk!


I like @AmalinaH's sample workflow. I also wanted to mention that there is a "Date" interface tool. It is useful because it can prevent users from entering a date in the wrong format.

 

There is a sample workflow for this tool built into Alteryx Designer. You can navigate to it from the Search Bar (top right) or Help menu. This will give you an example configuration.

 

 

Capture5.JPG

 

When you're troubleshooting apps, it can be SUPER helpful to use the "Open Debug" option in the Interface Designer. This will open up a new workflow that shows you exactly what is happening inside the app. Example: "Debug My App"

 

2022-06-21_23-30-56.png

 

Lastly, it's not very intuitive, but you must make sure to select by clicking on the Value or Attribute for which you want your action to apply. Your selection will show up as highlighted in blue. If you use the "Replace a specific string" option, make sure the string in the action tool is EXACTLY the same in your filter tool.

 

2022-06-21_23-30-56.png

 

 


Hope these tips help! If not, please share your workflow with some anonymized data, I'm sure we can help you get the configurations right.

 

Thanks,
Deb

Labels