Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

Including and Excluding values in Set Analysis Dimension

Hi,

Been following a few examples but I can't seem to get the correct result. I have a table with all the products a client has purchased. I am looking to do set analysis on a chart dimension to find which customers have purchased product X but not product Y but I am finding when doing a concat on ProductID as an expression in the table that customers with productId 1 and 3 are appearing in the list.


I have tried many different types of set analysis expression but below seemed to be the solutions that should of worked:

aggr(Only({$<ProductID={1}-{3}>} CustomerID), CustomerID)

aggr(Only({1<ProductID={1},ProductID-={3}>} CustomerID), CustomerID)

Am I trying to do something that shouldn't work?

-Chris

1 Solution

Accepted Solutions
Highlighted
Contributor

Re: Including and Excluding values in Set Analysis Dimension

This may depend on the setup of your table, but you can try:

  • only({$<ProductID={1}>-<ProductID={3}>} CustomerID)

S.

View solution in original post

2 Replies
Highlighted
Contributor

Re: Including and Excluding values in Set Analysis Dimension

This may depend on the setup of your table, but you can try:

  • only({$<ProductID={1}>-<ProductID={3}>} CustomerID)

S.

View solution in original post

Highlighted
Not applicable

Re: Including and Excluding values in Set Analysis Dimension

I feel like an idiot... That's excellent.

Many thanks.