Forum

This content is now out of date.

Visit Our Community

count if

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.
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

Forum image

Please let me know if this answers your query

Regards,
Stephen
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.
Hi Sharon

In that case your case statement will read as follows

Forum image

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

Hope this answers your question.

Regards,
Stephen