7 Replies Latest reply: Dec 20, 2015 4:54 PM by Gilles Courtin

Use of count function in set analysis

Hi i have a simple table   with   productid  ,  customerid , amount

ProductIDcustomerIDAmount
p01h01100
p02h02130
p03h01100
p04h03150

is want a simple chart which    gives me    the list of customers who has  purchased more than 2 products  so for that i am using

this expression

if(count(DISTINCT ProductID)>1,count(distinct ProductID))

and customID as my dimension  .

Is there any way that i can use Set analysis  for count(productID) >1    in the expression itself as  the above method takes to long to process the data .?

Thanks and regards

s_tushar

• Re: Use of count function in set analysis

not sure but this might work

Count({<count(DISTINCT ProductID)={">1"}>} distinct ProductID)

• Re: Use of count function in set analysis

Hi s_tushar,

Find the attachment,Hope it helps you

• Re: Use of count function in set analysis

The output should contain the list of customers who have bought more than 1 product  in this case  the customerID should be h01 as he has bought  product  p01 and p03

• Re: Use of count function in set analysis

hiii

use this

if(count( ProductID)>1,Count( ProductID))

• Re: Use of count function in set analysis

i have used this expression but the problem is its too resource intensive  is there a way that i can use count function in set analysis it self  like

count({<productID={"=count(productID)>1"}>}productID) but this doesnt work

as we use MAX , MIN functions inside set analysis  is there a way that we can construct a query with count() function ?

• Re: Use of count function in set analysis

Hi you can use a CUSTOMERID as Dimention And use Expression ="Count({\$<ProductIDCounter={">1"}>}DISTINCT ProductID)"

• Re: Use of count function in set analysis

Hi,

Maybe this could work :

=count({<CustomerID={"=count(distinct ProductID)>1"}>}Distinct ProductID)

Regards

Gilles