Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude Condition in set analysis

Hello sir,

i wanted to write set analysis for excluding condition . can  anybody tell me how to write it .

Thank u

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi Pankaj,

Try -= option

=Sum({<City-={'Mumbai', 'Pune'}>} Sales)

The above expression excludes the sales of Mumai and Pune cities.  Hope this is what yoy are expecting, if not so can you come up with some detailed info.

Regards,

Jagan.

View solution in original post

11 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi Pankaj,

Try -= option

=Sum({<City-={'Mumbai', 'Pune'}>} Sales)

The above expression excludes the sales of Mumai and Pune cities.  Hope this is what yoy are expecting, if not so can you come up with some detailed info.

Regards,

Jagan.

tresesco
MVP
MVP

May be like this?

Sum({<Regoin - ={'A'}>}Sales)      // '-' indicates the exclusion

Or,

if you are talking about indirect set analysis, use e() .

Not applicable
Author

You could use the - operator in the set analysis to exclude some conditions from a current selection data:

{$-1<Year={2012}>}

In this example, we are selecting the current selection data($), but excluding all the data from the 2012 year.

dmohanty
Partner - Specialist
Partner - Specialist

Suppose you have dimensions Region, Category, Year and some others too with a fact called SALES. If you want to do a aggregation using Set Analysis, it would be like this:

SUM({<Region = , Category = , Year = {'2013'}>}SALES)

Now, what the above expression would do: It would ignore all the values for Region and Category and show only the Sum of SALES that have happened in the Year 2013.

Try using your dimensions like this and let me know if it helped!

Regards!!!


CELAMBARASAN
Partner - Champion
Partner - Champion

you have to use -=

Sum({<Region-={'Europe'}>} Sales)

abeyphilip
Creator II
Creator II

Hi,

Something like this?

sum({<status =- {'OK'}>} XX)

Excludes those records with status OK.

Regards,

Abey

Not applicable
Author

Hi,

You want to exclude the condition or the values please post your requirement exactly and what type of condition you want to exclude.

Or follow this

Sum({fieldname-={condition}}Fieldname)

-= will exclude the values which satisfies the condition. Qlikview show red lines when you use -= but it works

Try this Hope it helps you

Not applicable
Author

Hi,

For the better understanding please find the PFA,

Not applicable
Author

Hi,

I would do sth like this:

{set 1} - {set 2}

where

set 1, the members you want to keep (current selection or whatever)

set 2, the members you want to exclude

Fabrice