Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Counts in pivots-QlikView

I have a table like this. when I pivot it, I only want to do a distinct count of Names with Status MQL, I want the count to ignore the names associated with the not MQL status. Here is the expression I thought would work:

if(FINALMQLSTATUS='MQL',Count (DISTINCT [Name]),0)      

   

NameFINALMQLSTATUS
BobMQL
JimNot MQL
SallyMQL

However, it still counts all of them and seems to ignore the if statement. Please help. What am I doing wrong? Thank you

13 Replies
Anonymous
Not applicable
Author

I am about to. Thanks

Anonymous
Not applicable
Author

A question about your expression above. What if I have two conditions instead of one? For instance, suppose I want to only count the name if FINALMQLSTATUS = 'MQL' AND  [product interest lexi]='Yes'. What would that syntax look like?

Anonymous
Not applicable
Author

I am referring here to the original response you gave where you suggested to use = Count(DISTINCT {< FINALMQLSTATUS = {'MQL'} >} [Name])

sunny_talwar

Just this

Count(DISTINCT {<FINALMQLSTATUS = {'MQL'}, [product interest lexi] = {'Yes'}>} [Name])