<?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: Pivot table issue with Aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415754#M427714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are couple of options for you to pursue... (I have used the sample attached by &lt;A href="https://community.qlik.com/qlik-users/218859"&gt;loveisfail&lt;/A&gt;‌, so thanks Anil &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a min date flag in the script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Sales Date]) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year([Sales Date]) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthName([Sales Date]) as MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Customer, Sales Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust1, 01/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust1, 12/12/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust2, 03/14/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust2, 02/15/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust3, 05/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust3, 06/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust4, 05/11/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Customer,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Min([Sales Date]) as [Sales Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sample&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Customer;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flag will show up like this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187205_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use a chart like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT {&amp;lt;Flag = {1}&amp;gt;} Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) You don't have to make any modifications in the script and use a chart like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(Aggr(If([Sales Date] = Min({&amp;lt;Year&amp;gt;}TOTAL &amp;lt;Customer&amp;gt; [Sales Date]), Customer), Customer, [Sales Date]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 2017 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/187206_Capture.PNG" style="height: 146px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 2016 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/187207_Capture.PNG" style="height: 140px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Dec 2017 12:09:08 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-12-16T12:09:08Z</dc:date>
    <item>
      <title>Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415749#M427709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The data set looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Customer&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sales Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;01/12/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;12/12/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;03/14/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;02/15/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust3&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;05/12/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Cust3&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;06/12/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;cust4&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;05/11/2017&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to build a line chart where the X axis is Month and Y axis is the &lt;SPAN style="font-size: 10pt;"&gt;count of customers whose first sales date falls in that month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;First sales date of&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cust1 is 12/12/2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cust2 is 02/15/2017&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cust3 is 05/12/2017&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cust4 is 05/11/2017&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an Year filter to make sure that we can see data for one year at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension used is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=aggr(Month(Min({&amp;lt;Year=&amp;gt;}[Sales Date])), Customer)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and the expression used is &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;count(Distinct Customer)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What it results into something like (Pivot table of the line chart is shown here) when year 2017 is selected in the Year filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Feb&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;May&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Dec&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is the Dec. &lt;/P&gt;&lt;P&gt;This should not show up becasue the year is 2017 but it shows up anyway because we are ignoring the selection of Year in the dimension expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I do not ignore the Year selection in the dimension then the chart would like something like this&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;Jan&lt;/TD&gt;&lt;TD colspan="1"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Feb&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;May&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The Jan will show up with 1 count. This happens becasue data is filtered by 2017 and Cust1 has first sales date in jan in 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i am not getting how to get to something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 2017 is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Feb&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;May&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when 2016 is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Month&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;Dec&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 05:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415749#M427709</guid>
      <dc:creator>jduluc12</dc:creator>
      <dc:date>2017-12-16T05:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415750#M427710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 06:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415750#M427710</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-16T06:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415751#M427711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;Thanks for the reply but i do not have access to the the script so i may not be able to use this solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 06:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415751#M427711</guid>
      <dc:creator>jduluc12</dc:creator>
      <dc:date>2017-12-16T06:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415752#M427712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I would try it with Month or YearMonth as Dimension and: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(aggr(firstsortedvalue(Customer, [Sales Date]), Customer, YearMonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 09:50:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415752#M427712</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-16T09:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415753#M427713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you mean, &lt;STRONG&gt;You don't have access in script&lt;/STRONG&gt;? Does it mean, You can't reload() application ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a while, Will you try this in expression?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(Date(Min(TOTAL &amp;lt;Customer&amp;gt; [Sales Date])), Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And show us the image with &lt;STRONG&gt;Month([Sales Date]) &lt;/STRONG&gt;as Dimension and expression is above. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 10:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415753#M427713</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-16T10:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue with Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415754#M427714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are couple of options for you to pursue... (I have used the sample attached by &lt;A href="https://community.qlik.com/qlik-users/218859"&gt;loveisfail&lt;/A&gt;‌, so thanks Anil &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a min date flag in the script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Sales Date]) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year([Sales Date]) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthName([Sales Date]) as MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Customer, Sales Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust1, 01/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust1, 12/12/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust2, 03/14/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust2, 02/15/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust3, 05/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust3, 06/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cust4, 05/11/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Customer,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Min([Sales Date]) as [Sales Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sample&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Customer;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flag will show up like this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187205_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use a chart like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT {&amp;lt;Flag = {1}&amp;gt;} Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) You don't have to make any modifications in the script and use a chart like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(Aggr(If([Sales Date] = Min({&amp;lt;Year&amp;gt;}TOTAL &amp;lt;Customer&amp;gt; [Sales Date]), Customer), Customer, [Sales Date]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 2017 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/187206_Capture.PNG" style="height: 146px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 2016 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/187207_Capture.PNG" style="height: 140px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 12:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue-with-Aggr/m-p/1415754#M427714</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-16T12:09:08Z</dc:date>
    </item>
  </channel>
</rss>

