Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
Not applicable
Author

Please try the below expression

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

Thank you

AV

View solution in original post

9 Replies
Not applicable
Author

Hi All

Enclosed is my QV doc

jonathandienst
Partner - Champion III
Partner - Champion III

Paul

This:

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


should work.


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Please try the below expression

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

Thank you

AV

MK_QSL
MVP
MVP

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

Not applicable
Author

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

tresesco
MVP
MVP

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

Not applicable
Author

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

Not applicable
Author

Hi Tres

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

Not applicable
Author

Hi All

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

Paul