Let's suppose I need to select all my countries but France (no macros, just a regular selection). I can get it just by typing this in the search bar: -FRANCE. Goal achieved!
Now, let's try to do it via macro. I know I could do this:
But this method has a problem: I may already have other selections (in other fields) and the new selection Country = France could be not matching them (for example, let's imagine I had selected City = Rome). If that happens, QlikView will remove as many selections as it needs to show data for France (normal QlikView behavior, as we know). I would lose the City = Rome filter, only because I wanted to exclude France. Locking all those previous selections wouldn't be a good choice here.
I thought I could try to work around this just by trying the minus sign approach. That is, selecting "-FRANCE" instead of having to take the two steps previously explained. But when I try to do this:
I'm not sure if it's possible - if it it will be probably a matter of quotes-syntax like doubling them or something similar stuff. Unfortunately it's not visible how the macro called this selection respectively how it will be interpreted from the field. This means it would be an ugly trial and error ...
As an alternatively you could use something like this: