Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jayaseelan
Contributor III

Find Count of Customers avilable in all date

Hi Expects,

          I need to calculate the no of customers that should available in all selected date. I have attached the sample data. any one can help me to do the task.

Thanks

Tags (2)
1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Find Count of Customers avilable in all date

Hi,

try this in Text Box

=Sum(Aggr(If(Count(DISTINCT Date)=Count(TOTAL DISTINCT Date),1),Customers))

Regards,

Antonio

8 Replies
devarasu07
Honored Contributor II

Re: Find Count of Customers avilable in all date

Hi,

Try like below

count(distinct Customers)

Capture.JPG

jayaseelan
Contributor III

Re: Find Count of Customers avilable in all date

Hi Devarasu,

   Thanks for you reply, This is not my output, i should count the customers who all available in all dates.

devarasu07
Honored Contributor II

Re: Find Count of Customers avilable in all date

Can you share your expected output for the given data,.tks

antoniotiman
Honored Contributor III

Re: Find Count of Customers avilable in all date

Hi,

try this in Text Box

=Sum(Aggr(If(Count(DISTINCT Date)=Count(TOTAL DISTINCT Date),1),Customers))

Regards,

Antonio

jayaseelan
Contributor III

Re: Find Count of Customers avilable in all date

if i select the following dates

 

2-20-2017
2-20-2017
2-23-2017
2-23-2017
3-20-2017
3-20-2017
3-20-2017
3-20-2017
3-15-2017
3-15-2017

my output should be

Capture.PNG

Because in my data customer "A" is available in all dates

Capture.PNG

if i select the following dates,

 

3-15-2017
6-20-2017

my output should be


Capture.PNG

Because in my data customer "A" and "B" is available in selected two dates


Capture.PNG


Thanks

jayaseelan
Contributor III

Re: Find Count of Customers avilable in all date

hi Antonio,

       Thank you so much, yes this is my output. but one more step i have to do,

I have to plot this value in the date.

is it possible??

jayaseelan
Contributor III

Re: Find Count of Customers avilable in all date

I have attached my data,

Sum(Aggr(If(Count(DISTINCT Date)=Count(TOTAL DISTINCT Date),1),Customers))

from above expression i am getting my output

Capture.PNG

i need to show the result in following way,

by your expression i am getting the result "1" value only at the 1st date  the result "1" should appear in all selected date.

Capture.PNG

antoniotiman
Honored Contributor III

Re: Find Count of Customers avilable in all date

Hi,

Try this

=Sum(TOTAL Aggr(If(Count(DISTINCT Date)=Count(TOTAL DISTINCT Date),1),Customers))

Regards,

Antonio