# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

## Count with 3 Value in 1 Dimension fulfill

Dear All,

Can anybody help for one case that i facing

Case :

i want to count how many people that bought all PEN , BOOK and ERASER  (if they bought BOOK and ERASER, not counted)

and have to be distinct.

the correct answer should be = 2 --> A and D

 DATE NAME ITEM QTY 1-Nov A BOOK 1 1-Nov A PEN 1 1-Nov B ERASER 1 1-Nov B BOOK 1 1-Nov C BOOK 1 2-Nov A ERASER 1 2-Nov D BOOK 1 2-Nov D PEN 1 2-Nov D ERASER 1 2-Nov E MAGAZINE 1 2-Nov E MAGAZINE 1 2-Nov D BOOK 1

Tags (1)
1 Solution

Accepted Solutions
MVP

## Re: Count with 3 Value in 1 Dimension fulfill

=COUNT({<NAME = p({<ITEM= {'PEN'}>})*p({<ITEM= {'BOOK'}>})*p({<ITEM= {'ERASER'}>}) >}DISTINCT NAME)

or

=COUNT({<NAME = {"=COUNT({<ITEM = {'PEN','BOOK','ERASER'}>}DISTINCT ITEM)=3"}>} DISTINCT NAME)

2 Replies
MVP

## Re: Count with 3 Value in 1 Dimension fulfill

=COUNT({<NAME = p({<ITEM= {'PEN'}>})*p({<ITEM= {'BOOK'}>})*p({<ITEM= {'ERASER'}>}) >}DISTINCT NAME)

or

=COUNT({<NAME = {"=COUNT({<ITEM = {'PEN','BOOK','ERASER'}>}DISTINCT ITEM)=3"}>} DISTINCT NAME)

Not applicable

## Re: Count with 3 Value in 1 Dimension fulfill

thanks a lot swuehl. the formula is correct and giving the right result.

can i know what is "p" stand for ?