If/Else not working as expected in filter

Thank you very much, @magnusbaeck
That does exactly what I intended. I didn't know that the conditions have to connected like that.