community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Dynamic input of only one value in filter tool

Meteor

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

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

Meteor

Thanks!

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

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)

Meteor

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

+Attachment.

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.

Meteor

Thanks @RolandSchubert , That seems to be working!

Labels