Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 id | date of transaction | # of transactions |
1 | 21/03/2013 | 0 |
1 | 19/03/2013 | 0 |
1 | 01/04/2013 | 1 |
1 | 30/11/1999 | 2 |
1 | 22/03/2013 | 0 |
1 | 02/04/2013 | 0 |
1 | 30/03/2013 | 0 |
2 | 01/04/2013 | 0 |
2 | 30/03/2013 | 0 |
2 | 30/11/1999 | 0 |
2 | 15/03/2013 | 0 |
2 | 30/03/2013 | 2 |
3 | 15/03/2013 | 0 |
4 | 30/03/2013 | 0 |
4 | 30/11/1999 | 3 |
5 | 30/03/2013 | 4 |
5 | 30/03/2013 | 4 |
5 | 30/11/1999 | 6 |
6 | 15/03/2013 | 0 |
6 | 30/03/2013 | 0 |
Thank you in advance.
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])
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])
You can use these two expressions:
count({<[# of transactions]-={0}>} distinct [customer id])
count({<[# of transactions]={0}>} distinct [customer id])
See attached qvw
Hi,
if you want to show the result in the text box..
then follow the attached application.
HTH
Sushil