Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kunkumnaveen
Contributor III

how to write expression

Hi ,

i want to count product which is supplied by only one supplier..


supplier    product       

A              gear

B              gear

C              break

D              glass

E               seat

Answer : 3 because break,glass, seat is supplied by only one supplier

how to write expression ?   plz

Thanks

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: how to write expression

Try in text box

=Count(Aggr(If(Count(DISTINCT supplier) = 1,supplier),product))

Regards,

Antonio

4 Replies
antoniotiman
Honored Contributor III

Re: how to write expression

Try in text box

=Count(Aggr(If(Count(DISTINCT supplier) = 1,supplier),product))

Regards,

Antonio

sergio0592
Valued Contributor II

Re: how to write expression

As expression:

count({<product={"=count(supplier)=1"}>} supplier)

qlikview979
Valued Contributor

Re: how to write expression

May be

=count({<product=P({<product={seat,'glass','break'}>})>}supplier)

antoniotiman
Honored Contributor III

Re: how to write expression

is equivalent to

count({<product={seat,'glass','break'}>}supplier)

However the list is hardcoded.

Regards,

Antonio