Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
montero_ro
Partner - Contributor II
Partner - Contributor II

Display Qlik Excluded Values in a Chart

Hello everyone,

I am trying to display the customers who ARE NOT buying a specific product. For this reason, I have tried some formulas,  such as count({<IDCUSTOMER=E(IDCUSTOMER)>} DISTINCT IDCUSTOMER and count({1-$} IDCUSTOMER  but no avial. In the image, I have the total customers who actually buy a product and below the ones who do not buy that specific item. It should show 9 customers.

 

montero_ro_0-1678981881506.png

 

Does anyone how can I achieve this?

 

Thanks a lot!

 

 

 

1 Solution

Accepted Solutions
PedroNetto
Partner - Creator
Partner - Creator

Hi @montero_ro !

Try: Count( {1<IDCUSTOMER = E({$<IDCUSTOMER ={'*'}>})>} IDCUSTOMER )

View solution in original post

7 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, like this?

Count( {$<Customer = E({1<Product={‘SpecificProduct’}>})>} IDCUSTOMER )

vinieme12
Champion III
Champion III

try

 

count({1}distinct cust)-count(distinct cust)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
tresesco
MVP
MVP

I guess getexcludedcount() is exactly for that

montero_ro
Partner - Contributor II
Partner - Contributor II
Author

I had tried something like that before, but this time I do not have a specific product that I want to exclude. I'd like to display a bar chart with all the products and the value to display would be the total count of customers that have not bought that specific product.

montero_ro
Partner - Contributor II
Partner - Contributor II
Author

It kind of works, but if you don't have any selections, the chart does not display data.

PedroNetto
Partner - Creator
Partner - Creator

Hi @montero_ro !

Try: Count( {1<IDCUSTOMER = E({$<IDCUSTOMER ={'*'}>})>} IDCUSTOMER )

montero_ro
Partner - Contributor II
Partner - Contributor II
Author

Hi there @PedroNetto I ended up using the following formula:

 

vTotalCustomers - Count(DISTINCT IDCUSTOMER) where vTotalCustomers has this expression

Count({<PRODUCTNAME>}DISTINCT IDCUSTOMER)

It works fine!

 

Thanks!