9 Replies Latest reply: Sep 27, 2013 12:01 PM by Alan Farrell

# 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])

• ###### Re: SET ANALYSIS

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

• ###### Re: SET ANALYSIS

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?

• ###### Re: SET ANALYSIS

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])

• ###### Re: SET ANALYSIS

thanks

• ###### Re: SET ANALYSIS

Manish

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

Best Regards,     Bill

• ###### Re: SET ANALYSIS

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

• ###### Re: SET ANALYSIS

I have a list box with 7000+ product codes

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

• ###### Re: SET ANALYSIS

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)

• ###### Re: SET ANALYSIS

excellent thanks