Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Contributor II

Set1 - Set2

Hello everyone ,

I have 3 sets They includes mutual values in both sets

I want to count values for each set at  belong only that sets

For example

a--> 1,2,3

b--> 2,5

c--> 1,6,7

I want distinct values belong to only that sets

count(a) = one value (3)

count(b) = one value (5)

count (c)= two values (6,7)

4 Replies
Valued Contributor

Re: Set1 - Set2

what do you mean by Set.. is this a field...

can you upload a sample QVW

Valued Contributor

Re: Set1 - Set2

=Count(Distinct {<Field = {'a'}>} Values)

Replace the "Field" in the above expression with the field that distinguishes the values as a, b, c.

Re: Set1 - Set2

Something like

1. =Count({<A-=P(B)> * <A-=P(C)>} DISTINCT A)

2. =Count({<B-=P(A)> * <B-=P(C)>} DISTINCT B)

3. =Count({<C-=P(A)> * <C-=P(B)>} DISTINCT C)

Not applicable

Re: Set1 - Set2


I would do sth like

count ({set} disctinct values)

where the set will be {set 1} - {set 2} to exclude the values of set 2 that could be in set 1

and where

set 1= {<Field = {'A'}>}

set 2 =  {<Field = - {'A'}>}   (= and - signs : everything except A)

If you want the current selection except A, inverse the = and - signs to do : set 2 =  {<Field -=  {'A'}>}


Community Browser