Alteryx Designer Desktop Discussions

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

Using filter contains for multiple values with dates

KCAgentProvocateur
8 - Asteroid

Can anyone help me on the filter below?

 

I would like to do the below:

[opted out] != "F" AND Contains([Opted Out Date], "2013")

 

then add years on later in my flow:

[opted out] != "F" AND Contains([Opted Out Date], "2013") OR Contains([Opted Out Date], "2014")

 

In my first statement i can still see data coming into my false filter result with opted out = T and opted out date = 10/21/2013 01:19PM

 

Ive attached screenshots.

 

Thanks,

Kerry

15 REPLIES 15
LordNeilLord
15 - Aurora

Hi Kerry,

 

For dates you will need to do DateTimeFormat([DateField], %Y) = 2013

kelsey_kincaid
12 - Quasar

Hi @KCAgentProvocateur ,

What's the data type of your date field? Is it a date or a string?

KCAgentProvocateur
8 - Asteroid

it is a string - do i need to use it in date format if i am just querying that it contains the year?

MichalM
Alteryx
Alteryx

It will be because your first condition is negative. It you split it across two filters, you should be ok.

 

First filter

[opted out] != "F"

 

Second filter

Contains([Opted Out Date], "2013") OR Contains([Opted Out Date], "2014")

 

kelsey_kincaid
12 - Quasar

@KCAgentProvocateur No you shouldn't have to convert it to a date and the Contains() function should work. Is it possible for you to attach an example of your flow?

KCAgentProvocateur
8 - Asteroid

they are all string - really not sure why its not working.

KCAgentProvocateur
8 - Asteroid

so after i do two separate filters i need to connect them back up? as if i do two separate filters i cant get the rows with data opted out = T and opted out date contains 2013

MichalM
Alteryx
Alteryx

Exactly, just like the below

opt-out.png

KCAgentProvocateur
8 - Asteroid

ok but i need the False values from the first filter and the true values from the second filter - so i could just do a join? my workflow is very big!

Labels