Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
madmax88
Creator II
Creator II

count Customer who boughty only one specific product

Hello

I have a question about unique counting. E.g.

4 Customer and 2 Products.  Now I need to know which Customer bought only a Car and only a Bike. If a Customer bought a Bike and a Car it should Count only as Car and 0 in Bike. I know there is an expression with "p" but I dont remember...any idea?

Car: 3 (A,B,D)

Bike: 1 (C)

CustomerProduct
ACar
ABike
CBike
DCar
BBike
BCar
4 Replies
tresesco
MVP
MVP

Customers who bought Only Bike:

=Concat(DISTINCT {<Product={'Bike'},Customer={"=Count(Distinct Product)=1"}>} Customer, ',')

Customers who bought Car:

=Concat(DISTINCT {<Product={'Car'}>} Customer, ',')

madmax88
Creator II
Creator II
Author

It doesn't seem to work. I have a set analysis with other criteria and it should be like this:

 

Count({<Product={'Car'},CriteriaA={'X'}>}Distinct Customer)

Now 

Concat(Distinct({<Product={'Car'},CriteriaA={'X'}>}Customer) has a wrong value

Kushal_Chawda

@madmax88  try below. 

For cars,

=Count(DISTINCT{<Product={'Car'}>}Customer)

For bikes,

=Count(DISTINCT{<Customer=e({1<Product-={"Bike"}>})>}Customer)

prerakdt
Contributor II
Contributor II

Try this,

For Cars,

Count({<Customer = P({<Product = {'Car'}>} Customer)>}Distinct Customer)

For Bike,

Count({<Customer = E({<Product = {'Car'}>} Customer)>}Distinct Customer)