Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List of clients who buy product A and not B

Hi !

Just a little question, is it possible in a table to show the client who buy a product A and not the product B.

I select a product A in a list selection, I select a product B in another list selection.

In a table, i want to see the clients who buy the product A and not the B

Thanks


regards,

Adrian

1 Solution

Accepted Solutions
thomduvi83
Partner - Contributor III
Partner - Contributor III

You should have a look to the "AND mode" for the list boxes.

In that mode, if you select 2 products, it will show you the clients who have bought product1 AND product2, not the clients who have bought product1 OR product2.

If you click longer on a product, you can exclude it (clients that have bought product 1 AND not product 2) --> RED color in Qlikview !

Look at this small example, then at the help menu for how to set up a table in "and mode".

Regards,

Thomas

View solution in original post

8 Replies
Miguel_Angel_Baeyens

Hi Adrian,

Using the element P() and E() functions in set analysis you will get it:

Sum({< Customer = E({< ProdID = {'B'} >} Customer) >} Amount)

Hope that helps.

Miguel

Not applicable
Author

Hi!!

It's possible to do that using an expression in a Straight Table Chart. In this chart you should select Client dimension and create the next expression.

sum({<product = {A}, product -= {B}>} number_of_clients)

Result:

Client1     1

Client2     1

...            1

ClienteN   1

Now you can hide the number_of_clients column if you want.

Jairo

Not applicable
Author

thanks a lot for your answers !

well, i didn't know the function P() and E() and there are easy to use.

I have another question, and i don't know if it's possible or not.

Users want to select in a list box a product A and in another one a product B.The result will be in a table and list clients

- who buy the product A

- and didn't buy the product B

Any ideas ?

thanks you a lot !

Not applicable
Author

The difference between your example and what user want, is in the set analysis : you write in code Product B but how is it possible to change this and let the user to decide with unsig a selection box ?

thomduvi83
Partner - Contributor III
Partner - Contributor III

You should have a look to the "AND mode" for the list boxes.

In that mode, if you select 2 products, it will show you the clients who have bought product1 AND product2, not the clients who have bought product1 OR product2.

If you click longer on a product, you can exclude it (clients that have bought product 1 AND not product 2) --> RED color in Qlikview !

Look at this small example, then at the help menu for how to set up a table in "and mode".

Regards,

Thomas

Not applicable
Author

waouh i had never seen that before (click longer to exclude !)

thanks a lot again !

Not applicable
Author

i want deep explain can u pls send me profect process in this answer pls provide me bro

Not applicable
Author

thanku jairo