Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

dmac1971
Contributor II

Counting based on 3 cases

I have 3 separate lists of data and I want to check how many items exist on all three lists.

I thought this might work :

=aggr(count(Distinct Item) LIST)

But not getting anywhere with it?  If I then wanted to count the number on specific lists, lets say only those items that appear on list 1 and 2, where the price is different and then another count where the price is the same how would you achieve it.

10 Replies

Re: Counting based on 3 cases

Seems comma is missing.

=Aggr(count(Distinct Item), LIST)

Re: Counting based on 3 cases

hi

Can you provide some sample data with your desired output.

Its easy to verify and resolve it

Re: Counting based on 3 cases

Can you share your qlik file.

Regards,

Anand

dmac1971
Contributor II

Re: Counting based on 3 cases

Cant share Qlik file, surprised that people even ask this?

dmac1971
Contributor II

Re: Counting based on 3 cases

Sorry I have a comma in my expression already, typo on here.  Expression will only work when List has filter to one single List name.  I need to see how many items exist on all three lists.

vsudhakar
Contributor III

Re: Counting based on 3 cases

count(Distinct Item), LIST)+count(Distinct Item), LIST)+count(Distinct Item), LIST)

luciancotea
Valued Contributor

Re: Counting based on 3 cases

Depending on the object used to display the value, you can have different approaches. To display on a chart and see the total:


=SUM(Aggr(count(Distinct Item), LIST))

luciancotea
Valued Contributor

Re: Counting based on 3 cases

A standard support procedure is to replicate the problem. Try to recreate it in another document using dummy data.

dmac1971
Contributor II

Re: Counting based on 3 cases

Lucian, many thanks, this works, I was missing the initial SUM.  If I now wanted to do the same calc but base the result on another field but only if greater than zero?  Say Price?

Community Browser