This forum is now out of date, for our new forum Click Here
count if
Question Asked
hi,

i'm trying to create a report the will count all customers that has signed up on specific dates (have a filter for this),
group by customer country, and to count also on this report
the customers have made an action in the same date range of the signup filter.

my problem is i don't know how to count the customers who have made the action (i have the action date in customer table in the database).

thanks.

sharon.

Sharon

Thu Nov 7, 2013 12:41 AM

Comment
Hi Sharon

An easy way to do this would be to add a calculated field to your report.

Below is an example using a calculated field to add a count of 1 when a customer action date is not null. This will count all the customers that has a valid action date



Please let me know if this answers your query

Regards,
Stephen

Stephen

Thu Nov 7, 2013 4:03 AM

Comment
thank for you fast answer, the problem is that i want to count the customers that have done the action between the registration date filter.
is it possible?

in sql i write something like:
sum(if(actionDate between X and Y,1,0))

thanks.

Sharon

Thu Nov 7, 2013 9:56 PM

Comment
Hi Sharon

In that case your case statement will read as follows



You then just apply the sum function(Ʃ) to the calculated field.

Hope this answers your question.

Regards,
Stephen

Stephen

Thu Nov 7, 2013 11:17 PM