Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Count problem

Hi Folks,

I have a question where not sure how to get the result and need your help !

Result should be  3

data :

A    B    C  D                      should be counted

1  1    1    9                            No (A=1)

2  1    1    8                            Yes

2  1    1    7                            No (duplicate from last row,  B=1 C=1 )

2  2    1    6                            Yes

2  1   2    5                            Yes

Criteria

Count only  "once for  B  within  same C" and A =2

Thx in advanced gurus    

1 Solution

Accepted Solutions

Re: Count problem

May be this:

=Count(DISTINCT {<A = {'2'}>} B&C)

4 Replies

Re: Count problem

May be this:

=Count(DISTINCT {<A = {'2'}>} B&C)

Re: Count problem

Attaching the sample qvw with a screenshot:

Capture.PNG

Not applicable

Re: Count problem

Hi Sunny,

thx, man.  It works.

Can you share more   on  B&C  . ?  what does it do actually   ?

thx Sunny

Re: Count problem

B&C is just concatenating the values for each row for Column B&C and doing a DISTINCT count of B&C

data :

A    B    C  D    B&C                  should be counted

1  1    1    9       11                     No (A=1)

2  1    1    8       11                    Yes

2  1    1    7       11                     No (duplicate from last row,  B=1 C=1 )

2  2    1    6       21                     Yes

2  1   2    5        12

HTH

Best,

Sunny

Community Browser