Alteryx Designer Desktop Discussions

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

Using filter contains for multiple values with dates

KCAgentProvocateur
Asteroide

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 RESPUESTAS 15
LordNeilLord
Aurora

Hi Kerry,

 

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

kelsey_kincaid
Cuásar

Hi @KCAgentProvocateur ,

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

KCAgentProvocateur
Asteroide

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 Alumni (Retired)

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
Cuásar

@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
Asteroide

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

KCAgentProvocateur
Asteroide

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 Alumni (Retired)

Exactly, just like the below

opt-out.png

KCAgentProvocateur
Asteroide

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!

Encuestas
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Etiquetas