Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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

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

Please try the below expression

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

Thank you

AV

9 Replies
Not applicable

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

Hi All

Enclosed is my QV doc

MVP
MVP

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

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

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

Please try the below expression

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

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

Not applicable

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

MVP
MVP

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.

Not applicable

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

Not applicable

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 ?

Not applicable

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

Community Browser