You can use element functions in your set analysis expression to implicitly specify an element list.

You can use either P() for possible values in a given field or E() for excluded values in a given field or combination of both P() and E() to create a set of intersection, union or exclusion.

Let’s think of this scenario: You have been asked to show customers who purchased beverages but did not purchase dairy products.

The set modifier will require and condition or intersection operator(*).

sum({<CompanyName = P({1<[Category Name] = {‘Beverages’}>}) * E({1<[Category Name] = {‘Dairy Products’}>} CompanyName)>}LineSalesAmount)

The first part of the element set will have a set of possible values of customers who purchased beverages while ignoring any user selections(modifier 1); second part of the element set will have all the excluded values of customers who did not purchase dairy products while ignoring user selections(modifier 1).

pand eNow, the modifier contains intersection of the two sets to create a result set that contains customers who purchased beverages but did not purchase dairy products. This is incredibly powerful feature.

Set Analysis is one of the most powerful tools in your toolbox as a QlikView or Qlik Sense developer.

You can download a concise Set Analysis guide that you can use as a reference to master this powerful functionality.

Master Set Analysis: Syntax and Examples

 

DV and I recently launched Set Analysis course on Udemy. You can enroll just for $29 for limited time.

QlikView Set Analysis Course

-Shilpan


If you enjoyed this article, get email updates (it’s free).

Email Address: