Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to count Clients that had bought alt least 2 products in the same month.
Sample Data.
Client_id Product Sale Month
1 1 1 1
1 2 1 1
2 1 1 1
2 2 1 2
3 2 1 1
In the case above only client 1 should be counted as is the only one that bought Product 1 and 2 in the same month. I was thinking of using P function, but the problem is that P function operates in the whole dataset, and need a function tha can working alongwith Month Dimension.
This function is not what I Expect, because Client 2 will also be counted in Month2
Count({<Client_id=
P({<Product ={"1"}>})
*P({<Product ={"2"}>})>}distinct Client_id )
Any help??
Create Table with Client and month as dimension
and
=if(count(Distinct Product)>1,count(Distinct Product))
as expression