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: 
picturebox
Partner - Creator
Partner - Creator

Including and Excluding Selections in Set Analysis

Hello,

I have a set of stores and a set of products. Additionally I have a table (lets call it sales) that tells me which product was sold in which store at what date. So the table Sales links the stores and products together.

So if I select a product QV shows me which stores it has been sold in at some point in time. And the other way around, if I select a store I get a listing of the products that have been sold in that store at some point in time. What I am having difficulty with is listing all the stores that have "not" sold this product at any time. Generally, I would select the products I want to check and give a time period (say 4 weeks) that I want to check. I do this with a set analysis using the $ and time period set modifier - this lists me all the stores without sales ... but the product has had to have been sold in the store at some time ...

Something like:

if (getselectedcount(Product)>0, if(count( $ <Week = {1,2,3,4} Sales) =0, 'No Sales'))

This does not list the stores that have never sold the product. How do I get that list for only the selected products?

Using the 1 as set definer ignores all other selections so I can at least list all the stores. But the problem is that I then get ALL the products listed, instead of just the selected products. Should I be experimenting with the P() or E() sets? Or is it possible to use the selected products, but then set modify to include the total Store list? Cannot imagine what that syntax would look like...

Unfortunately it is part of a very large dataset, otherwise I would upload it. Any help would be welcome....

Thanks,

Petra

1 Reply
picturebox
Partner - Creator
Partner - Creator
Author

Hello,

I just wanted to check if anyone did not have an interest to tackle this problem ...

I would really appreciate any input.

Thanks,
Petra