Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count non selected

My tables consists of:

Customer     Product     Sales £

A                 X               1.00

A                 Y               1.00

A                 Z               1.00

B                 X               1.00

B                 Y               1.00

C                 Y               1.00

I would like to use a list box to select a product and then create a table like below so I can see how many are buying and how many are not:

If product X selected

          Qty customers     Qty customers

          buying                  not buying

X          2                         1

If product Z selected

          Qty customers     Qty customers

          buying                  not buying

Z           1                        2

1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You need to clear selections in Product, too:

Count({<Customer =e(), Product=>} TOTAL DISTINCT Customer)

see also attached

View solution in original post

7 Replies
swuehl
Champion III
Champion III

Create a straight table chart with dimension Product and two expressions:

=Count(DISTINCT Customer)

=Count({<Customer =e()>} TOTAL DISTINCT Customer)

sunny_talwar

Z seems to be bought by 2 customers also. A and C? Isn't it?

Not applicable
Author

Hi swuel

The latter formula is not accepted. Is there a syntax error in it ?

Not applicable
Author

Thanks Sunny T. Now corrected.

swuehl
Champion III
Champion III

Is it just highlighted by the syntax checker, or is there no result shown in the table?

swuehl
Champion III
Champion III

You need to clear selections in Product, too:

Count({<Customer =e(), Product=>} TOTAL DISTINCT Customer)

see also attached

sunny_talwar

This should also work for you.

Count({<Product>}TOTAL DISTINCT Customer) - Count(DISTINCT Customer)


Capture.PNG