6 Replies Latest reply: Jun 8, 2017 3:24 AM by Ruan Greeff

# multiple supplier expression

Hello,

i want to display count of products  which is supplied by only  one supplier

[

product,supplier

A,XXX

A,YYY

A,ZZZ

B,HHH

B,LLL

C,OOO

L,PPP

];

expression:   =Count(Aggr(If(Count( distinct supplier) = 1,supplier),product))    so answer:2 which is correct

now for the same data i am trying to count  products which is supplied by multiple supplier

expression:     =Count(Aggr(If(Count( distinct supplier) >1,supplier),product))  so answer suppose to be 2 but i am geeting zero

can any help plz.

Thanks

• ###### Re: multiple supplier expression

Like this ??

=Count(Aggr(If(Count( distinct supplier) > 0 ,supplier),product))

• ###### Re: multiple supplier expression

looks like greater then zero wont work because i need count of only those products which is supplied my multiple vendors or suppliers

• ###### Re: multiple supplier expression

Try like this

=sum(Aggr(if(Count(distinct supplier)>1,1,0),product))

• ###### Re: multiple supplier expression

hi

use this function

=sum(Aggr(if(Count(distinct supplier)>1,1,0),product))

• ###### Re: multiple supplier expression

Or you can try

=Count(Aggr(If(Count( distinct supplier) >=1 ,supplier),product))

• ###### Re: multiple supplier expression

Hi,

Please see below.  I believe this will work.

=count(if(aggr(count(supplier),product)>1,product))