Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i want to display count of products which is supplied by only one supplier
load * inline
[
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
hi
use this function
=sum(Aggr(if(Count(distinct supplier)>1,1,0),product))
Like this ??
=Count(Aggr(If(Count( distinct supplier) > 0 ,supplier),product))
hi
use this function
=sum(Aggr(if(Count(distinct supplier)>1,1,0),product))
Or you can try
=Count(Aggr(If(Count( distinct supplier) >=1 ,supplier),product))
Thanks for reply,
looks like greater then zero wont work because i need count of only those products which is supplied my multiple vendors or suppliers
Try like this
=sum(Aggr(if(Count(distinct supplier)>1,1,0),product))
Hi,
Please see below. I believe this will work.
=count(if(aggr(count(supplier),product)>1,product))