4 Replies Latest reply: Jul 12, 2013 3:36 PM by Nancy Simpson

# 2 Set Analysis statements in Expression

Sum({<[Season Name] = {Mens}>}  {<[StockCrossdock] = {Stock}>}  [Qty])/ Count({<[Season Name] = {Mens}]>}  {<[StockCrossdock] = {Stock}>} CASE#))

my result is 35

If I only use the first Set Analysis: Sum({[Season Name] = {Mens}>} [QTY]) / Count({<[Season Name] = {Mens}]>} CASE#), the result is 33

I'm looking for If [Season Name] = 'Mens' and [StockCrossdock] = 'Stock', give me the Sum(Qty)/Count(Case#).

Also, if I create another expression for 'Womens' with the exact same expression but change 'Mens" to "Womens", I get the exact same values as I got with the 'Mens' expression.

Thanks

• ###### Re: 2 Set Analysis statements in Expression

I think you need to use

Sum({<[Season Name] = {Mens}, [StockCrossdock] = {Stock}>}  [Qty])

/

Count({<[Season Name] = {Mens}, [StockCrossdock] = {Stock}>} CASE#)

• ###### Re: 2 Set Analysis statements in Expression

Thank you so much, that did it!  Now I need to add another criteria and am not sure how to write it.

If [Season Name] = 'Mens' or [Season Name] = 'Womens' and [StockCrossdock] = 'Stock'...

• ###### Re: 2 Set Analysis statements in Expression

Sum({<[Season Name] = {Mens,Womens}, [StockCrossdock] = {Stock}>}  [Qty])

/

Count({<[Season Name] = {Mens,Womens}, [StockCrossdock] = {Stock}>} CASE#)

• ###### Re: 2 Set Analysis statements in Expression

Thank you so much!  My weekend looks much brighter!