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

Sets when NOT equal to

=sum({$<Activity = {"*Funding Sheet*"}>}count(Opics)/2)

Hi Guys

I have the above expression, but I wish it to read , when Activity is NOT equal to Funding sheet. I have tried <> and NOT but these dont work .


Can anyone help ?

Or alternatively is it possible to set 2 sets,

So Activity is equal to either Structure or Unstructure ?

Thanks


A

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

You are very close. Use this instead

sum({$<Activity -= {"*Funding Sheet*"}>}count(Opics)/2)

(note the "-" sign that makes the "-=" operator).

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

6 Replies
Miguel_Angel_Baeyens

Hi,

You are very close. Use this instead

sum({$<Activity -= {"*Funding Sheet*"}>}count(Opics)/2)

(note the "-" sign that makes the "-=" operator).

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks Miguel

Not applicable
Author

Hi Miguel,

If I wanted the set to be

Not equal to Funding sheet and where AM = Anne

Can I have 2 conditions in set ?

=count({$<Activity -= {"*Funding Sheet*"}>},{$<[AM]={"*Anne*"}>}(Opics))

I have tried above, but its clearly incorrect !!

Thanks

Not applicable
Author

Try out this below expression.

count({$<Activity -= {"*Funding Sheet*"},[AM] = {"*Anne*"} >} Opics)

-Sridhar

Miguel_Angel_Baeyens

Hi,

Shridar's answer is the correct one for your second question.

Anyway, I'd like to note the meaning of quoting in set analysis, it's important since, as in every other condition, speed matters, and the faster the set is build the faster your chart will render.

No quotes are used when the values you want to use in your set modifiers are numeric, for example, the year

Sum({< Year = {2010, 2011} >} Sales)

Single quotes are used with literals (strings), for example, a list of fixed values

Sum({< Country = {'ES', 'FR', 'UK'} >} Sales)

Double quotes are used to search for the values that match certain pattern

Sum({< Customer = {"AA*"} >} Sales)

Double quotes are used to enclose single quotes as well, and to get sets depending on functions, for example, customers with Sales above 1000

Sum({< Customer = {"=Sum(Sales) > 1000"} >} Sales)

So applied to the above, with fixed values, the expression should look like (although the one posted will work)

Count({< Activity -= {'Funding Sheet'}, AM = {'Anne'} >} Opics)

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

That actually clears up alot of questions that I had about sets

Thanks

Anne