Alteryx Designer Desktop Discussions

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

Using Filters

traceystone
8 - Asteroid

Hello,

 

Seeking help with a custom filter. I need to filter out everything in the [Asset Status] column that is = "Retired" and has a [Scheduled Retirement date] < "01/01/2020". I have attached the workflow and a snapshot of what the data looks like in those 2 columns. What I have doesn't seem to be working.

11 REPLIES 11
atcodedog05
22 - Nova
22 - Nova

Hi @traceystone 

 

Maybe what you are looking for is

 

[Asset Status] = "Retired" or [Schedule Retirement Date] < "2020-01-01"

 

Hope this helps : )

traceystone
8 - Asteroid

Well. I tried that but that removed all retired. I still want to see retired but only >01/01/2020

MatthewBr
Alteryx Alumni (Retired)

Double Check that the date field is actually a date field and not a string. Happens sometimes when importing from excel. Could be throwing off the filter.

 

MatthewBr_0-1631553943875.png

 

Please mark as complete if answer solves your challenge. 

atcodedog05
22 - Nova
22 - Nova

Hi @traceystone 

 

Can you provide some sample input and expected output it will help us get a better understanding of the usecase.

traceystone
8 - Asteroid

It was set to vstring. I tried to change it to date but it didn't like that. The date wasn't in the correct format. I added a formula to convert from 01/01/2020 to 2020-01-01 seems to work but I am getting errors. I think it is the fields that are blank. How do I handle blank fields? I attached a picture of the 2 date columns that I converted. You can see there are blanks(which are supposed to be there) and attached a screenshot of the errors I am getting.

Luke_C
17 - Castor

Hi @traceystone 

 

Your datetimeparse function is incorrect. You need to put the format the data is currently in, so:

 

Datetimeparse([Retired],'%m/%d/%Y') should work

MatthewBr
Alteryx Alumni (Retired)

Try this....

 

MatthewBr_0-1631554867152.pngMatthewBr_1-1631554873080.png

 

MatthewBr
Alteryx Alumni (Retired)

 Use the DateTime tool to convert your :String information to a DATE and then use that new field in the filter.

atcodedog05
22 - Nova
22 - Nova

Hi @traceystone 

 

Do you have more than one format of date in the data date column? If yes you can use a formula like this

 

atcodedog05_0-1631555234791.png

 

Hope this helps : )

 

Labels