Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

2 Set Analysis statements in Expression

Please help.  If I use this 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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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

/

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

View solution in original post

4 Replies
swuehl
MVP
MVP

I think you need to use

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

/

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

Not applicable
Author

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'...

swuehl
MVP
MVP

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

/

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

Not applicable
Author

Thank you so much!  My weekend looks much brighter!