Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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
Master III
Master III

Try in text box

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

Regards,

Antonio

View solution in original post

4 Replies
antoniotiman
Master III
Master III

Try in text box

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

Regards,

Antonio

sergio0592
Specialist III
Specialist III

As expression:

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

qlikview979
Specialist
Specialist

May be

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

antoniotiman
Master III
Master III

is equivalent to

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

However the list is hardcoded.

Regards,

Antonio