<?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: Preceding months qty's in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352061#M492428</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;Thank you for the reply. Unfortunately it's not exactly what I'm looking for. If you look at the attachment with selections Year = 2012, Month = May and FinncPriod = 111, you will see that the column with the monthname 'May' has the qty's for May 2012 underneath. These qty's are correct. In the column to the left of it (with the light red shading) I want the qty's for Apr 2012 and in the column to the left of that one, Qty's for Mar 2012 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm hoping to achieve this with set analysis without going through building a calender. One would think a set analysis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FinncPriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=$(=Max(FinncPriod)-1)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,D&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or something similar should give me the Qty's for Apr 2012? FinncPriod after all has a unique no for all transactions in a particular month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Danie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 12:20:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-16T12:20:41Z</dc:date>
    <item>
      <title>Preceding months qty's</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352059#M492424</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;I have a single table with the load script-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CardCode&lt;/P&gt;&lt;P&gt;ItemCode&lt;/P&gt;&lt;P&gt;DocNum&lt;/P&gt;&lt;P&gt;DocDate&lt;/P&gt;&lt;P&gt;Month(DocDate) as Month&lt;/P&gt;&lt;P&gt;Year(DocDate) as Year&lt;/P&gt;&lt;P&gt;FinncPriod&lt;/P&gt;&lt;P&gt;Qty&lt;/P&gt;&lt;P&gt;SalesAmt&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table where I need to show Sales Qty for the current month and also for the preceding 11 months. FinncPriod is a number that runs sequentially from the 1st posting period to last posting period of the current financial year. So transactions for May 2012 all have '110' as posting period in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My formula for the Qty's for current month is - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;FinncPriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=Max(FinncPriod)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt;) and it gives the correct Qty's&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My problem is the formula for the preceding months. I have tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;FinncPriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=FinncPriod-1"&lt;/SPAN&gt;},&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;=,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;=,&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;=&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt;) gives the same answer as current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;FinncPriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=FinncPriod-1"&lt;/SPAN&gt;},&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;=,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;=&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt;) gives the same answer as current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;FinncPriod&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=Max(FinncPriod)-1"&lt;/SPAN&gt;},&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;=,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;=,&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;=&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Quantity&lt;/SPAN&gt;) gives the same answer as current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm attaching a copy of the model herewith.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any ideas how to solve this, please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Danie&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 11:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352059#M492424</guid>
      <dc:creator />
      <dc:date>2012-07-16T11:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding months qty's</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352060#M492426</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;In fact you need to display for each month, the value for the month and the value for the 11 months before this month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the chart function before() or above() if you want to calculate the sum of last 11 months only on values in graph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you need a real moving sum, you can follow this thread &lt;A _jive_internal="true" href="https://community.qlik.com/message/229267#229267"&gt;http://community.qlik.com/message/229267#229267&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 11:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352060#M492426</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-07-16T11:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding months qty's</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352061#M492428</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;Thank you for the reply. Unfortunately it's not exactly what I'm looking for. If you look at the attachment with selections Year = 2012, Month = May and FinncPriod = 111, you will see that the column with the monthname 'May' has the qty's for May 2012 underneath. These qty's are correct. In the column to the left of it (with the light red shading) I want the qty's for Apr 2012 and in the column to the left of that one, Qty's for Mar 2012 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm hoping to achieve this with set analysis without going through building a calender. One would think a set analysis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FinncPriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=$(=Max(FinncPriod)-1)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,D&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or something similar should give me the Qty's for Apr 2012? FinncPriod after all has a unique no for all transactions in a particular month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Danie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 12:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352061#M492428</guid>
      <dc:creator />
      <dc:date>2012-07-16T12:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding months qty's</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352062#M492429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FinncPriod={"$(=Max(FinncPriod)-1)"}&amp;gt;}Quantity) and so on. And remove filters Year, Month, Day you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried on your application and I get 105 for April, 143 for March, ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And please, next time, don't post a 26 MB file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 12:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-months-qty-s/m-p/352062#M492429</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-07-16T12:42:15Z</dc:date>
    </item>
  </channel>
</rss>

