Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
coloful_architect
Creator II
Creator II

set expression to count customer who only purchasing selective products at one product group without purchasing other products at that group

hi gurus,

 

so I have a data structure like this 

product group, product, customer, units ,sales

let 's say one of product groups is beverage, so product would be soda, juice , etc  but we have other product group like 

bread, diary .... 

now I want to know the count of customers who have only purchased product 'Juice' under product group of beverage without purchasing any other beverage products across the board ....that means,  the count of those customers who have only purchased Juice but may also purchased bread products or diary products.....

so far I seem to be able to  get the customer count that only purchasing Juice without purchasing any other products at all... like 

Count({$<[Product Group]={'beverage'}, [Customer Full Name] ={"=Count( Distinct [Product Group])=1"}>} [Customer ])

but do not get correct numbers by keeping the exclusion only at the level of product group of beverage 

any suggestions?

Thanks 

 

Labels (1)
1 Reply
Anil_Babu_Samineni

Perhaps this?

Count({$<[Product Group]=E({$<[Product Group]-={'beverage'}>} [Product Group]), [Customer Full Name] ={"=Count( Distinct [Product Group])=1"}>} [Customer ])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful