<?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 Chart expression using max, if, count and distinct in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335373#M1177553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this using AGGR()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT (DISTINCT Aggr(IF(Max(DATEFSR) &amp;lt; DATEIN,CALLNO), CALLNO))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2012 06:05:48 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-03-05T06:05:48Z</dc:date>
    <item>
      <title>Chart expression using max, if, count and distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335372#M1177552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im trying to get an expression to work without using script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This chart expression correctly counts the number of call numbers where the job (call) has been completed on time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT (DISTINCT (IF(DATEIN&amp;gt;DATEFSR,CALLNO)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This chart expression also works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max({1}TOTAL &amp;lt;CALLNO&amp;gt; DATEFSR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It calculates the maximum date for each call number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I combine the two as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT (DISTINCT (IF( &lt;/P&gt;&lt;P&gt;max({1}TOTAL &amp;lt;CALLNO&amp;gt; DATEFSR)&lt;/P&gt;&lt;P&gt;&amp;lt; DATEIN,CALLNO)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't calcualte the correct totals. It just gives a null value or zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can calculate the max date in script and then it works fine but would prefer to do this all in a table chart expression if possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2012 16:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335372#M1177552</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-03-04T16:31:21Z</dc:date>
    </item>
    <item>
      <title>Chart expression using max, if, count and distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335373#M1177553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this using AGGR()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT (DISTINCT Aggr(IF(Max(DATEFSR) &amp;lt; DATEIN,CALLNO), CALLNO))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 06:05:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335373#M1177553</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-05T06:05:48Z</dc:date>
    </item>
    <item>
      <title>Chart expression using max, if, count and distinct</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335374#M1177554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does exactly what I want. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 21:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-expression-using-max-if-count-and-distinct/m-p/335374#M1177554</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-03-05T21:44:20Z</dc:date>
    </item>
  </channel>
</rss>

