Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am trying to do something that i think should be simple but I can not to get it to work...
I want to get a list of sales by customers who purchased a minimum of 3 out of 4 products. Whether it be A,B,C, or A,B,D, or A,C,D, or B,C,D.
OR simply an expression that will give me customers who purchased the package of A and B and C, and then I can just run it four times and then manipulate the data for unique names only.
I do not want A or B or C. All three must be met.
Calculated list box with this expression should work:
aggr(only(if(count(distinct Product)>=3, Customer)),Customer)
Edit:
If you want sales (or whatever else) for these customers, use the above expression as calculated dimension in a chart (for example straight table). Don't forget to "suppress when value is null. Use sum(sales) as expression.
The idea would be to then select 4 products at random from my list of products and the customer list box would only associate to those customers who purchased a minimum of three of them.
I tried your suggestion and I do not believe it worked. When I made my selection of products it only looked for one of these products and ANY other 3 (regardless of whether I selected them or not),
Les,
I don't see a reason for this not to work. Either you did something differently, or the scenario is a little more complex than you've described. If you upload application or at least data model it may help to understand the issue better.
Not sure why it did not work. I ended up using expression below in a chart with customer as dimension. Even though it is probably not the best way it still worked...my intention was not to get the sales amount at the same time but it still gives me the list of customers
if
(count(distinct product)>=3, sum(sales),0) ;
I think it would be better to use calculated dimension, but whatever works for you is fine. Close enough...