Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Andy_C
Contributor
Contributor

Indirect Set Analysis

Hi

Im using the expression below to sum sales by AccountID for accounts that include the product ‘Prosecco’.  

sum({<[AccountID]=P({<[Product Name]={[Prosecco]}>})>}[Sales])

However I now want to expand this to only sum sales on accounts which have a 'Quantity Sold' of Prosecco of X, but im struggling to link sum([Quantity Sold]) for ‘Prosecco’ into the expression

Thanks in advance

Andy

1 Solution

Accepted Solutions
Kushal_Chawda

try this

sum({<[AccountID]={"=sum({<[Product Name]={'Prosecco'}>}[Quantity Sold])=X"}>}[Sales])

Note: Replace X with actual number .You can also use '>' ,'<'

View solution in original post

3 Replies
martinpohl
Partner - Master
Partner - Master

here is an example of sum sales only for those customers who have sell an quantity > 1000

sum( {$<AccountID= {“=Sum({1<[Product Name] = {Prosecco}>} [Quantity Sold] ) > 1000”}>} Sales )

Regards

Kushal_Chawda

try this

sum({<[AccountID]={"=sum({<[Product Name]={'Prosecco'}>}[Quantity Sold])=X"}>}[Sales])

Note: Replace X with actual number .You can also use '>' ,'<'

Andy_C
Contributor
Contributor
Author

Thank you both for the quick responses, this expression appears to be returning the numbers i was expecting