<?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 Problem with aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-aggr-function/m-p/409155#M152137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I ask someone for help&lt;/P&gt;&lt;P&gt;My problem is this:&lt;/P&gt;&lt;P&gt;In a data structure similar to that present in the attached file, I would like to create a table (see Table 2-B)&lt;/P&gt;&lt;P&gt;when I extract only the rows of people in a given month did not have sales and at the same time&lt;/P&gt;&lt;P&gt;compared with sold in the previous month.&lt;/P&gt;&lt;P&gt;I used the aggr with Set Analysis table see Table 2 and Table 2-B.&lt;/P&gt;&lt;P&gt;1-Why the table Table 2 does not work?&lt;/P&gt;&lt;P&gt;If I do not apply any selection on the month it seems to work well (see Table2-B).&lt;/P&gt;&lt;P&gt;For example Amanda has not had sales last month, but he's had in the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2-If I select a month, for example, three months, I think you should not change anything, it does not work..&lt;/P&gt;&lt;P&gt;Conversely, if I select for example the second month (months number 2), &lt;/P&gt;&lt;P&gt;I would expect to see in the table Table2-B only Frank for the month 2 had no sales while he's had in month 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone give me a tip?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hello and Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2013 11:47:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-06T11:47:03Z</dc:date>
    <item>
      <title>Problem with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-aggr-function/m-p/409155#M152137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I ask someone for help&lt;/P&gt;&lt;P&gt;My problem is this:&lt;/P&gt;&lt;P&gt;In a data structure similar to that present in the attached file, I would like to create a table (see Table 2-B)&lt;/P&gt;&lt;P&gt;when I extract only the rows of people in a given month did not have sales and at the same time&lt;/P&gt;&lt;P&gt;compared with sold in the previous month.&lt;/P&gt;&lt;P&gt;I used the aggr with Set Analysis table see Table 2 and Table 2-B.&lt;/P&gt;&lt;P&gt;1-Why the table Table 2 does not work?&lt;/P&gt;&lt;P&gt;If I do not apply any selection on the month it seems to work well (see Table2-B).&lt;/P&gt;&lt;P&gt;For example Amanda has not had sales last month, but he's had in the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2-If I select a month, for example, three months, I think you should not change anything, it does not work..&lt;/P&gt;&lt;P&gt;Conversely, if I select for example the second month (months number 2), &lt;/P&gt;&lt;P&gt;I would expect to see in the table Table2-B only Frank for the month 2 had no sales while he's had in month 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone give me a tip?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hello and Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 11:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-aggr-function/m-p/409155#M152137</guid>
      <dc:creator />
      <dc:date>2013-02-06T11:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-aggr-function/m-p/409156#M152138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved this problem with this logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created two variables, one to store the last date and the second variable to store the last date -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vmax: = MAX (Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxMin1: = MAX ({$} &amp;lt;Month-={"$(vMax)"}&amp;gt; Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the chart I created two expressions: LAST and LAST -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LAST: Sum ({} &amp;lt;Month={"$(=max(Month))"}&amp;gt; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LAST -1: Sum ({} &amp;lt;Month={"$(vMaxMin1)"}&amp;gt; Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope helped you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 12:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-aggr-function/m-p/409156#M152138</guid>
      <dc:creator />
      <dc:date>2013-02-06T12:17:10Z</dc:date>
    </item>
  </channel>
</rss>

