New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
New Contributor III

Count active customers between 2 dates

Hello,

I'm trying to count the number of active customers between 2 dates to create an analysis about campagin results. In these analysis we're compairing the facts with last year, that's why im using 2 dates.

 Customer Date A 5-5-2016 B 5-5-2016 C 6-5-2016 D 7-5-2016 E 8-5-2016 F 9-5-2016 G 10-5-2016 H 11-5-2016 A 5-5-2017 B 6-5-2017 I 7-5-2017 J 8-5-2017 K 9-5-2017 L 10-5-2017

So im trying to figure out the following calculation:

=count ({\$<Date = {">=Campaigndate<=30-05-2016"}>} DISTINCT Customer)

The campagindate is for example 06-05-2016.

But it seems like the enddate '30-05-2016' doesnt work.

Does anyove have an idea how to solve this one?

Thnx!

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Honored Contributor III

Re: Count active customers between 2 dates

Hi Guy,

try this if campaigndate is a Field

=count ({\$<Date = {">=\$(=Max(Campaigndate))<=30-05-2016"}>} DISTINCT Customer)

or this if campaigndate is a Variable

=count ({\$<Date = {">=\$(Campaigndate)<=30-05-2016"}>} DISTINCT Customer)

Regards,

Antonio

4 Replies
Highlighted
Partner

Re: Count active customers between 2 dates

Hi,

Try this:

=count ({\$<Date = {">=Campaigndate<=\$(=Date(30-05-2016))"}>} DISTINCT Customer)

Highlighted
New Contributor III

Re: Count active customers between 2 dates

Hi Niclas,

Thnx for your reply, I've just tried this but the results of the calculation is 0.

So it seems like it isn't working...

Do youve another idea?

Highlighted
Honored Contributor III

Re: Count active customers between 2 dates

Hi Guy,

try this if campaigndate is a Field

=count ({\$<Date = {">=\$(=Max(Campaigndate))<=30-05-2016"}>} DISTINCT Customer)

or this if campaigndate is a Variable

=count ({\$<Date = {">=\$(Campaigndate)<=30-05-2016"}>} DISTINCT Customer)

Regards,

Antonio

Highlighted
Contributor III

Re: Count active customers between 2 dates

Try to make like in this app