Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamic input of only one value in filter tool


I am using one filter tool which is filtering the data based on month values. If today's date is between 1-8 then last month is the current month else last to last is the current month.


Formula as follows:

([Date New] = Left(DateTimeAdd(Left(DateTimeToday(),8)+"01",IIF(DateTimeDay(DateTimeToday())<=8,-2,-1),"months"), 10))


I was the user to input the value 8 at run time. So that user can decide that the date should be less than 8 or any other date(10 or 12).


How to achieve this  using interface?

Alteryx Certified Partner
Alteryx Certified Partner

I think you have to convert the workflow to an Analytic App.

You can use an Numeric UpDown tool for input and update the
number of days in the formula by an Action tool (see attached picture).


Action tool should be configured to "Update Value"/"Replace a specific string"


I hope this is helpful



But this would replace the complete condition (in filter tool) with the input number. How to replace just the "8" number (in condition) with specific the value in filter condition?

Alteryx Certified Partner
Alteryx Certified Partner

In the formula, you should use a "unique" number (e.g. "99") and configure the Action tool to replace only this number
Formula will be:

Left(DateTimeAdd(Left(DateTimeToday(), 8)+"01", IIF(DateTimeDay(DateTimeToday())<= 99,-2,-1),"months"), 10)

and Action tool will replace "99" by the selected value

(see picture)


This seems to be not working. It is not filtering the records correctly.


Alteryx Certified Partner
Alteryx Certified Partner

If you run the workflow as an Analytic Application, it seems to work
(if you run it as a workflow, it doesn't!)
I've adjusted the formula a bit and added an output file to check.


Thanks @RolandSchubert , That seems to be working!