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

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?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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.