Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
Customer | Product |
A | Car |
A | Bike |
C | Bike |
D | Car |
B | Bike |
B | Car |
Customers who bought Only Bike:
=Concat(DISTINCT {<Product={'Bike'},Customer={"=Count(Distinct Product)=1"}>} Customer, ',')
Customers who bought Car:
=Concat(DISTINCT {<Product={'Car'}>} Customer, ',')
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
@madmax88 try below.
For cars,
=Count(DISTINCT{<Product={'Car'}>}Customer)
For bikes,
=Count(DISTINCT{<Customer=e({1<Product-={"Bike"}>})>}Customer)
Try this,
For Cars,
Count({<Customer = P({<Product = {'Car'}>} Customer)>}Distinct Customer)
For Bike,
Count({<Customer = E({<Product = {'Car'}>} Customer)>}Distinct Customer)