l0feic
l0feic

Reputation: 27

Filter case with multiple conditions SPSS

I'm trying to combine different conditions within the same case. To be more specific, I want to include various parties into my filter. So far, I have following code:

RANGE(edate,date.mdy(9,14,14),date.mdy(8,30,20)) AND partyabbrev = "AfD"

However, I do not just want to include "AfD", but also e.g. "FN", "FiDeSz-KDNP", "PVV", among others. So, my question would be, how do I combine them into partyabbrev-filter? I already tried using AND partyabbrev = "FN" AND partyabbrev = "PVV" etc. but that did not work unfortunately.

Would really appreciate it if you could help me -- I already tried various YT tutorials but it was never really case specific.

Thanks!!

Upvotes: 1

Views: 170

Answers (1)

eli-k
eli-k

Reputation: 11310

This should do it:

RANGE(edate,date.mdy(9,14,14),date.mdy(8,30,20)) 
   AND any(partyabbrev, "AfD", "FN", "FiDeSz-KDNP", "PVV").

Upvotes: 1

Related Questions