Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic input of only one value in filter tool

TarunDeep
8 - Asteroid

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?

6 REPLIES 6
RolandSchubert
16 - Nebula
16 - Nebula

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

TarunDeep
8 - Asteroid

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?

RolandSchubert
16 - Nebula
16 - Nebula

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)

TarunDeep
8 - Asteroid

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

+Attachment.

RolandSchubert
16 - Nebula
16 - Nebula

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.

TarunDeep
8 - Asteroid

Thanks @RolandSchubert , That seems to be working!

Labels