Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count of sum of values

Hi there,

I have a set of customers with the number of transactions they performed in certain dates.

I want to show in a textbox the number of ids ( unique) that have not performed any transactions and the ones that have performed at least one transaction in the entire data history.

for example using the test data below i should display :

# of Customers with transactions : 4 ( customers 1,2,4 and 5)

# of Customers with no transactions : 2 ( customers 3 and 6)

customer iddate of transaction# of transactions
121/03/2013 0
119/03/2013 0
101/04/2013 1
130/11/1999 2
122/03/2013 0
102/04/2013 0
130/03/20130
201/04/2013 0
230/03/2013 0
230/11/1999 0
215/03/20130
230/03/2013 2
315/03/20130
430/03/2013 0
430/11/19993
530/03/2013 4
530/03/2013 4
530/11/1999 6
615/03/2013 0
630/03/20130

Thank you in advance.

1 Solution

Accepted Solutions
manideep78
Partner - Specialist
Partner - Specialist

Expression for # of Customers with transactions :

=Count({<[# of transactions] = {"<>0"}>} DISTINCT [customer id])

Expression for # of Customers with no transactions:

=Count({<[# of transactions] = {'0'}>} DISTINCT [customer id])

View solution in original post

3 Replies
manideep78
Partner - Specialist
Partner - Specialist

Expression for # of Customers with transactions :

=Count({<[# of transactions] = {"<>0"}>} DISTINCT [customer id])

Expression for # of Customers with no transactions:

=Count({<[# of transactions] = {'0'}>} DISTINCT [customer id])

Gysbert_Wassenaar

You can use these two expressions:

count({<[# of transactions]-={0}>} distinct [customer id])

count({<[# of transactions]={0}>} distinct [customer id])

See attached qvw


talk is cheap, supply exceeds demand
sushil353
Master II
Master II

Hi,

if you want to show the result in the text box..

then follow the attached application.

HTH

Sushil