Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
azmeerrehan
Partner - Creator
Partner - Creator

Products Never Bought

I have a customer data with sales for Products.   I have fields

Customer

Year

Product

Sales

I want to get the list of Products which were never bought by a customer

Lets say I have 3 Products and Customer A never bought Product no 3 so I want to see  out put as

Customer A , 3

Please Help

18 Replies
azmeerrehan
Partner - Creator
Partner - Creator
Author

Can you pls attach a sample?

ogautier62
Specialist II
Specialist II

OK but later

For the moment I'm waiting for the dentist l've just my phone 😉

azmeerrehan
Partner - Creator
Partner - Creator
Author

Sorry to bother you . I tried the second approach but it doesn't work

ogautier62
Specialist II
Specialist II

no problm Rehan,

here it is :

with these datas :

CustomerYearProductSales
cust12018A35
cust12017B14
cust12018C10
cust22017A5
cust22018B40
cust32017C21
cust4

1)

custprod:

load distinct Customer resident sales;

tmp:

load distinct Product resident sales;

outer join (custprod) load Product resident tmp;

drop table tmp;

then in front :

2)

prod2:

load distinct Product as Product2 resident sales;

then in front :

regards

azmeerrehan
Partner - Creator
Partner - Creator
Author

Can you pls attach the qvw?

azmeerrehan
Partner - Creator
Partner - Creator
Author

The intitial one I sent was just a simple table. I have an actual data model where I am looking to list all the products not bought by a customer.

Attached is my actual Data Model. How can I accomplish the same task in my data model. Attached are the sample XLS and qvw being used

azmeerrehan
Partner - Creator
Partner - Creator
Author

My data set is so huge that the charts times out . There has to be  a way to create these " Not Bought Products" as a field in the data set

ogautier62
Specialist II
Specialist II

Hi,

that's why solution 1 is better and should not increase much response time,

with your data , in script :

item:

LOAD  * FROM test.xlsx

(ooxml, embedded labels, table is item);

custprod:

load distinct Cust_Code resident item;

tmp:

load distinct Product resident item;

outer join (custprod) load Product resident tmp;

drop table tmp;

and then a sheet with just the two dimensions :

Cust_Code, Product

and as expression :

I've free desktop installed, I can't up or download qvw

regards

ogautier62
Specialist II
Specialist II

oups that was the wrong sheet, here is better :