<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Count how many IDs have a sum(value)&amp;lt;100 between two dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739467#M56572</link>
    <description>&lt;P&gt;Yes, a date is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value doesn't really matter as such, it is just for the sake of demonstrating the issue&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2020 13:12:58 GMT</pubDate>
    <dc:creator>jakobjensen</dc:creator>
    <dc:date>2020-08-28T13:12:58Z</dc:date>
    <item>
      <title>Count how many IDs have a sum(value)&lt;100 between two dates</title>
      <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739442#M56565</link>
      <description>&lt;P&gt;I have some fields, "ID", "orderdate" and "value".&lt;/P&gt;&lt;P&gt;I want to count, how many IDs have a total sum less than 1000 within the last (chosen) year.&lt;/P&gt;&lt;P&gt;I have tried the following&lt;/P&gt;&lt;P&gt;count({&amp;lt;id={"=sum({&amp;lt;orderdate.autoCalendar.Date={$(= '&amp;gt;=' &amp;amp; addmonths(orderdate.autoCalendar.Date,-12) &amp;amp; '&amp;lt;=' &amp;amp; orderdate.autoCalendar.Date)}&amp;gt;} value)&amp;lt;1000"}&amp;gt;} distinct id)&lt;/P&gt;&lt;P&gt;but it just returns "0" all the time.&lt;/P&gt;&lt;P&gt;Can some one explain why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 11:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739442#M56565</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2020-08-28T11:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count how many IDs have a sum(value)&lt;100 between two dates</title>
      <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739461#M56568</link>
      <description>&lt;P&gt;Do you have one date selected when you are trying to look at this? If not, may be you need to use Max(Date) like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;id = {"=Sum({&amp;lt;orderdate.autoCalendar.Date = {""$(='&amp;gt;=' &amp;amp; AddMonths(Max(orderdate.autoCalendar.Date), -12) &amp;amp; '&amp;lt;=' &amp;amp; Max(orderdate.autoCalendar.Date))""}&amp;gt;} value) &amp;lt; 1000"}&amp;gt;} DISTINCT id)&lt;/LI-CODE&gt;&lt;P&gt;Also, do you need &amp;lt;100 or &amp;lt;1000, please fix accordingly&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739461#M56568</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-28T13:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count how many IDs have a sum(value)&lt;100 between two dates</title>
      <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739467#M56572</link>
      <description>&lt;P&gt;Yes, a date is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value doesn't really matter as such, it is just for the sake of demonstrating the issue&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739467#M56572</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2020-08-28T13:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count how many IDs have a sum(value)&lt;100 between two dates</title>
      <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739470#M56573</link>
      <description>&lt;P&gt;Got it, did your try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;id = {"=Sum({&amp;lt;orderdate.autoCalendar.Date = {""$(='&amp;gt;=' &amp;amp; AddMonths(Max(orderdate.autoCalendar.Date), -12) &amp;amp; '&amp;lt;=' &amp;amp; Max(orderdate.autoCalendar.Date))""}&amp;gt;} value) &amp;lt; 1000"}&amp;gt;} DISTINCT id)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739470#M56573</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-28T13:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count how many IDs have a sum(value)&lt;100 between two dates</title>
      <link>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739742#M56603</link>
      <description>&lt;P&gt;It very much seems like it does!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two questions:&lt;/P&gt;&lt;P&gt;1) How come the two double-quotes are needed in the date expression?&lt;/P&gt;&lt;P&gt;2) Can it be extended to the sum being in an interval (e.g 100-200)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 07:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-how-many-IDs-have-a-sum-value-lt-100-between-two-dates/m-p/1739742#M56603</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2020-08-31T07:08:29Z</dc:date>
    </item>
  </channel>
</rss>

