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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if based on sum

Hi,

I am new to QlikView and trying to solve following problem:

I want to calculate the number of persons (=count(DISTINCT PersonID)) that had

  • no money at the beginning of year: Sum({<xDATE ={'1.1.2014'}>}xEUR)=0
  • but have it now: Sum({<xDATE ={'11.6.2014'}>}xEUR)>0

Combing those doesn't work:

=COUNT(DISTINCT {<Sum({<xDATE ={'1.1.2014'}>}xEUR)=0 and Sum({<xDATE={'31.12.2013'}>}xEUR)>0>} PersonID)

Does anyone have any suggestions?

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try:

=COUNT(DISTINCT {<PersonID ={"=Sum({<xDATE ={'1.1.2014'}>}xEUR)=0 and Sum({<xDATE={'31.12.2013'}>}xEUR)>0 ">} PersonID)

View solution in original post

2 Replies
tresB
Champion III
Champion III

Try:

=COUNT(DISTINCT {<PersonID ={"=Sum({<xDATE ={'1.1.2014'}>}xEUR)=0 and Sum({<xDATE={'31.12.2013'}>}xEUR)>0 ">} PersonID)

Not applicable
Author

Thanks! It actually makes more sense now.