Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: How do I do <> in set analysis?

Hi,

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

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

Hope that helps.

Miguel

Highlighted
Not applicable

Re: How do I do <> in set analysis?

Thanks Miguel, much appreciated.

Highlighted
Contributor III
Contributor III

Re: How do I do <> in set analysis?

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

Highlighted
Not applicable

Re: How do I do <> in set analysis?

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

Paul.

Highlighted

Re: How do I do <> in set analysis?

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

Highlighted
Not applicable

Re: How do I do <> in set analysis?

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?

Highlighted

Re: How do I do <> in set analysis?

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