9 Replies Latest reply: Jan 24, 2014 9:19 AM by Paul Yeo

# I need to count how many items with out any unit price

Hi All

I need to count how many items with out any unit price.

Below expression working fine , which can count how many items ?

count(distinct(PART_NO_))

In order to count only those items have unit price , i need add the above condiction into above expression :-

count(if([Unit Price] > 0), distinct(PART_NO_))

But it cannot work.

Can some one advise me ?

Paul

• ###### Re: I need to count how many items with out any unit price

Hi All

Enclosed is my QV doc

• ###### Re: I need to count how many items with out any unit price

Paul

This:

count(distinct if([Unit Price] > 0), PART_NO_))

should work.

HTH

Jonathan

• ###### Re: I need to count how many items with out any unit price

Hi Jona & Manish

i try both your expression , it not work , may be because my Unit Price it a Expression below , i also change to Column(1) , it also don't work :-

if(match(Currency_P,'SG'),

money(

(

Ceil(

LAND_COST_TDS_SGD/MARKUP_SUB*RATE_P

,0.5)

)

,CurrencyFormat_P),

money(

(

Ceil(

FOB_SGD_SUB*RATE_P*TRANSPORT_SUB/MARKUP_SUB*LESS

,0.5)

)

,CurrencyFormat_P)

)

Paul

• ###### Re: I need to count how many items with out any unit price

Please check your [Unit Price] expression per se. It shows some error.

• ###### Re: Re: I need to count how many items with out any unit price

Hi Tres

You are right , i just notice . Can you help me to count how many items with unit price ?

• ###### Re: I need to count how many items with out any unit price

if(NUM( [Unit Price]) > 0 , Count(Distinct [PART_NO_]))

Thank you

AV

• ###### Re: I need to count how many items with out any unit price

Hi All

Thank you very much for the expression . So far I confirm Vardhan working fine.

Paul

• ###### Re: I need to count how many items with out any unit price

Count({<[Unit Price] = {">=0"}>}Distinct Part_No)

• ###### Re: I need to count how many items with out any unit price

if there are null values in the price column, then use this if(isnull(Unit Price), Count(Distinct [PART_NO_]))