Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

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

  if( ID=FIRST_ID,

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

mohamed_ahid
Partner - Specialist
Partner - Specialist

us only() function in this case .

can you send a sample file ?

Not applicable
Author

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

Not applicable
Author

DOESN'T WORK

anbu1984
Master III
Master III

Check this app