Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MK_QSL
MVP
MVP

SET ANALYSIS

I want to count different part number having quantities greater than 0.

How to write in set analysis?

COUNT({Quantity > 0}Distinct [Part Number])

1 Solution

Accepted Solutions
swuehl
MVP
MVP

COUNT({<Quantity = {">0"} >} Distinct [Part Number])

View solution in original post

9 Replies
swuehl
MVP
MVP

COUNT({<Quantity = {">0"} >} Distinct [Part Number])

Anonymous
Not applicable

Manish

Try:     COUNT ( { < Quantity = ">0" > ) Distinct [Part Number])

Best Regards,     Bill

rustyfishbones
Master II
Master II

Hi Swuehl,

How would it look if you wanted the SUM(Quantity)

would it be

COUNT({<SUM(Quantity) = {">0"}>} DISTINCT [Part Number])

or is it different?

swuehl
MVP
MVP

You can use only pure field names on the left side of field modifiers.

You can try something like

count( {< [Part Number] = {"=sum(Quantity)>0"} >} DISTINCT [Part Number])

Not applicable

sth like with p() function

count({<[part Number] = p({1}<[part Number])  >} distinct [part Number])

or

count( {<[part Number] = {"=sum(Quantity)>0" } distinct [part Number]) )

Fabrice

rustyfishbones
Master II
Master II

thanks

rustyfishbones
Master II
Master II

I have a list box with 7000+ product codes

How do I only show the 900 codes that have sales,

swuehl
MVP
MVP

You can use the search bar on top of the list box

=sum(Sales)>0

or if you want to create a filtered list box, use a field expression:

=aggr( if(sum(Sales)>0,ProductCode), ProductCode)

or

=aggr(only({<ProductCode = {"=sum(Sales)>0"}>} ProductCode), ProductCode)

rustyfishbones
Master II
Master II

excellent thanks