Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

7 Replies
SunilChauhan
Champion
Champion

not sure but this might work

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

Sunil Chauhan
jvishnuram
Partner - Creator III
Partner - Creator III

Hi s_tushar,

Find the attachment,Hope it helps you

Not applicable
Author

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 

er_mohit
Master II
Master II

hiii

use this

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

Not applicable
Author

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 ?

sujeetsingh
Master III
Master III

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

Not applicable
Author

Hi,

Maybe this could work :

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

Regards

Gilles