Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I do <> in set analysis?

I am trying to load everything in a set analysis statement except one specific and I can't use <>. How do I do it?

7 Replies
Miguel_Angel_Baeyens

Hi,

Use the "-=" operator (it will show as expression error, but it's a bug):

Sum({< Employee -= {'Fred'} >} Sales)

Hope that helps.

Miguel

Not applicable
Author

Thanks Miguel, much appreciated.

oxtontom
Contributor III
Contributor III

Hey mrpjspencer,

I know Miguel has already answered the question with the corrent answer but I often get frustrated that it the "-=" operator will show as a bug so I tend to use this.

=

Sum(

    {

        <

            Employee= {'*'} - {''Fred''}

        >

    } Sales)

It's a longer way to do it but it means you won't see expression errors.

Thanks

Tom

Not applicable
Author

Thanks, not to fussed about the cosmetics of it as long as it works. Have Qlikview been told about this bug?

Paul.

Miguel_Angel_Baeyens

Hi Paul,

Yes, we know about it. It happened in previous versions and for some reason it keeps happening but the expression works just fine irrespective what the syntax check underlines in red. Hopefully it will be fixed in the coming release.

Regards,

Miguel

Not applicable
Author

Ive just realised ive got a problem.

 

 

avg

({<Region={[SW],[SE],[KE]},Commercial_Domestic={[Domestic]},Water_Supplier_Text_SW-={[Southern Water]},Waste_Water_Receiver_Text_SW={[Southern Water]

}>}Amount)

See where the writing is Black, its not taking those parts as part of the calculation in my set analysis and is throwing my figures off

Can anyone help?

Miguel_Angel_Baeyens

Hi,

Assuming that in your expression above "SW", "SE", "Domestic" and so are literal values of fields, the syntax should be:

Avg({< Region = {'SW', 'SE', 'KE'}, Commercial_Domestic = {'Domestic'}, Water_Supplier_Text_SW -= {'Southern Water'}, Waste_Water_Receiver_Text_SW = {'Southern Water'

} >} Amount)

More on how to use quotes properly in set analysis can be found in this post, among some others...

Hope that helps.

Miguel