Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
shawn-qv
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.

2 Replies
shawn-qv
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.

Not applicable

Re: Including and Excluding values in Set Analysis Dimension

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

Many thanks.

Community Browser