Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
pnutbutta
Contributor II
Contributor II

Using P() with multiple criteria

Is it possible to use P() to show a set that has multiple criteria in the formula? In my case looking for customers that each purchase all three products. I do not want in this group customers that only purchase 1 or 2 products. Only customers have purchase all three.

Sum({$<CustomerName=P({1<Product={'1016'},{'2016'},{'1032'}>}CustomerName)>}(Qty))

1 Solution

Accepted Solutions
sunny_talwar

Or this

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '2016', '1032'}>} Product) = 3"}>} Qty)

View solution in original post

3 Replies
sunny_talwar

May be this

Sum({$<CustomerName=P({1<Product={'1016'}>})*P({1<Product={'2016'}>})*P({1<Product={'1032'}>})>}(Qty))

sunny_talwar

Or this

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '2016', '1032'}>} Product) = 3"}>} Qty)

pnutbutta
Contributor II
Contributor II
Author

Thanks Sunny. This is exactly what I was hoping for.