Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Problem with counting

Hello Everyone,

i want make this count in pivot table:

=count(DISTINCT( if(ENTRYDATE=ORDERDATE,

  if( ID=FIRST_ID,

   if(DOC_TYPE<>14, if(SOURCE_IDX<>7, ITEM))))))


My problem is that for ID=FIRST_ID i don't want make the control by row but by the column.

So for example if the table is that


ITEMORDERDATEENTRYDATEIDFIRST_IDDOC_TYPESOURCE_IDX
BOX120.03.201420.03.201444111199
BOX320.03.201420.03.201454111199
BOX120.03.201420.03.201444111199
BOX1
20.03.2014

20.03.2014

44111199



i want count 4 item for BOX1 because there are 4 FIRST_ID equal to ID of BOX1.


Can you Help me? PS: i don't know i fixed value for the ID because it changes for every ITEM

Thank you,

Alfonso

5 Replies
anbu1984
Honored Contributor III

Re: Problem with counting

=Aggr(count(DISTINCT( if(ENTRYDATE=ORDERDATE,

  if( ID=FIRST_ID,

   if(DOC_TYPE<>14, if(SOURCE_IDX<>7, ITEM)))))),ITEM)

Partner
Partner

Re: Problem with counting

us only() function in this case .

can you send a sample file ?

Not applicable

Re: Problem with counting

USE THE LITTLE TABLE... I CANNOT GIVE THIS DATA

Not applicable

Re: Problem with counting

DOESN'T WORK

anbu1984
Honored Contributor III

Re: Problem with counting

Check this app