<?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: Counting problem with rates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036129#M639560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CheckOpenorClosed:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD INVOICE_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(DATE) AS DATE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (sum(PAID) &amp;gt;= sum(WAS_INVOICED), 1, 0) AS ClosedFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT Payments&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;GROUP BY INVOCIE_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LEFT JOIN (Payments)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD INVOICE_ID, DATE, ClosedFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT CheckOpenorClosed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE ClosedFlag = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Table CheckOpenorClosed;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2016 11:28:35 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2016-02-26T11:28:35Z</dc:date>
    <item>
      <title>Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036125#M639556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. &lt;/P&gt;&lt;P&gt;I hope somebody will help me with this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached table I have to count paid premiums.&lt;/P&gt;&lt;P&gt;But If the rate is not fully paid, it shall not be counted as paid that month. Only when it is finally settled, it shall be counted as paid that month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;in July we have two payments, but the first is not fully paid. So it has to be considered as paid in October when we have final payment. This is clear if we look at INVOICE_ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 623px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="115"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; text-align: right;" width="161"&gt;DATE&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; text-align: right;" width="95"&gt;PAID&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; text-align: right;" width="113"&gt;WAS_INVOICED&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; text-align: right;" width="139"&gt;INVOICE_ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none;"&gt;&lt;SPAN style="color: #00ff00;"&gt;7&lt;/SPAN&gt;&lt;STRONG style="color: #00ff00;"&gt;3102&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top-style: none; border-left-style: none; text-align: right;"&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;STRONG&gt;03.07.2015&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;STRONG&gt;3,02&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;STRONG&gt;4,84&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="color: #00ff00;"&gt;5004838057&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14.07.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5004933732&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;30.07.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5004933732&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14.08.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041077206&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;07.09.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041077206&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14.09.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041231027&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none;"&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;STRONG&gt;73102&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="color: #00ff00;"&gt;06.10.2015&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="color: #00ff00;"&gt;1,82&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="color: #00ff00;"&gt;0&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #00ff00;"&gt;&lt;STRONG&gt;5004838057&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;06.10.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041231027&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14.10.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041371358&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;21.10.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041371358&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;13.11.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041507020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14.12.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041688607&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;16.12.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041507020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;73102&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;28.12.2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4,84&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5041688607&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we count PAID, we get 8 using the formula: =Count( {$&amp;lt;PAID = {'&amp;gt;0'}&amp;nbsp; &amp;gt;}PAID ) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 486px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="2"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;I want results like below&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="98"&gt;MONTH_YEAR&lt;/TD&gt;&lt;TD class="xl65" style="border-left-style: none; text-align: right;" width="98"&gt;COUNT_PAID&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH_YEAR&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="83"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;COUNT_PAID&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top-style: none; text-align: right;"&gt;total: &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; text-align: right;"&gt; &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;total: &lt;SPAN style="color: #ff0000;"&gt;7&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;jul-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;STRONG style=": ; color: #ff0000;"&gt;2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;jul-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="color: #ff0000;"&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;avg-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70"&gt;&lt;/TD&gt;&lt;TD class="xl70"&gt;&lt;/TD&gt;&lt;TD class="xl70"&gt;avg-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;sep-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;sep-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;okt-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;okt-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;nov-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;nov-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;dec-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;dec-2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 09:07:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036125#M639556</guid>
      <dc:creator>davidg_curs</dc:creator>
      <dc:date>2016-02-26T09:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036126#M639557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ Would you be so kind and take a look at this problem and tell me if is possible? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036126#M639557</guid>
      <dc:creator>davidg_curs</dc:creator>
      <dc:date>2016-02-26T11:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036127#M639558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(DATE) as MONTH,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(DATE)&amp;amp;'-'&amp;amp;Year(DATE) as MONTH_YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PAID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAS_INVOICED, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INVOICE_ID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;D&gt;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp; If(INVOICE_ID=Previous(INVOICE_ID) &lt;/P&gt;&lt;P&gt;&amp;nbsp; and Outstanding &amp;lt;=0 &lt;/P&gt;&lt;P&gt;&amp;nbsp; and peek(Outstanding) &amp;gt;0, 1,0) as IsFullyPaid;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(INVOICE_ID&amp;lt;&amp;gt;Previous(INVOICE_ID),&lt;/P&gt;&lt;P&gt;&amp;nbsp; rangesum(WAS_INVOICED,-PAID),&lt;/P&gt;&lt;P&gt;&amp;nbsp; rangesum(Peek(Outstanding),-PAID)) as Outstanding&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp; TEMP&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; INVOICE_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then count the fully paid invoices per month with count({&amp;lt;IsFullyPaid={1}&amp;gt;}distinct INVOICE_ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036127#M639558</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-02-26T11:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036128#M639559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is a feature you should add to your data model. Group your invoices, sum the paid amount and if the paid amount = invoiced amount, add a flag Closed = 1 (or the inverse 'Open = 0') to the last line (most recent date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use set analysis to only include Closed invoices in your reporting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036128#M639559</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-02-26T11:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036129#M639560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CheckOpenorClosed:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD INVOICE_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(DATE) AS DATE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (sum(PAID) &amp;gt;= sum(WAS_INVOICED), 1, 0) AS ClosedFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT Payments&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;GROUP BY INVOCIE_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LEFT JOIN (Payments)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD INVOICE_ID, DATE, ClosedFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT CheckOpenorClosed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE ClosedFlag = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Table CheckOpenorClosed;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036129#M639560</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-02-26T11:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036130#M639561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be:&lt;/P&gt;&lt;P&gt;=Count( {$&amp;lt;PAID = {'&amp;gt;0'}, WAS_INVOICED={0}&amp;nbsp; &amp;gt;}DISTINCT INVOICE_ID ) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036130#M639561</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-02-26T11:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036131#M639565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use Advance Set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count( {$&amp;lt;INVOICE_ID={"=(Sum(WAS_INVOICED)-Sum(PAID) &amp;gt;0 "}&amp;nbsp; &amp;gt;}DISTINCT INVOICE_ID)&lt;/P&gt;&lt;P&gt;I hope it help to you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 12:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036131#M639565</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2016-02-26T12:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036132#M639569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I wanted to solve with the SET analysis but I was almost convinced that I had to fix the data model. This is good solution, but I will create new extraction from database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 14:16:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036132#M639569</guid>
      <dc:creator>davidg_curs</dc:creator>
      <dc:date>2016-02-26T14:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting problem with rates</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036133#M639573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. This was the last option &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 14:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-problem-with-rates/m-p/1036133#M639573</guid>
      <dc:creator>davidg_curs</dc:creator>
      <dc:date>2016-02-26T14:17:29Z</dc:date>
    </item>
  </channel>
</rss>

