<?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 Aggregating Previous Rows in a Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599473#M221911</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 been struggling to get this to work and would be really grateful if someone could give me some pointers. Basically I have a table that has 3 dimensions - Manager, Department and Date. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I would like to be able to do is sum up the sales for the manager in a particular department for the current month and all previous months in the selection. I have seen solutions using an As Of Date table but I don't think this will work for my current scenario as the number of months selected can be varied by the end user. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My initial thoughts were to use set analysis but obviously you can't look at the dimensions value in a particular row in the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example table of what I am trying to achieve is attached for a single manager, the chart could have multiple managers and multiple departments however.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 11:11:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-03T11:11:50Z</dc:date>
    <item>
      <title>Aggregating Previous Rows in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599473#M221911</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 been struggling to get this to work and would be really grateful if someone could give me some pointers. Basically I have a table that has 3 dimensions - Manager, Department and Date. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I would like to be able to do is sum up the sales for the manager in a particular department for the current month and all previous months in the selection. I have seen solutions using an As Of Date table but I don't think this will work for my current scenario as the number of months selected can be varied by the end user. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My initial thoughts were to use set analysis but obviously you can't look at the dimensions value in a particular row in the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example table of what I am trying to achieve is attached for a single manager, the chart could have multiple managers and multiple departments however.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 11:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599473#M221911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-03T11:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating Previous Rows in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599474#M221912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create an AsOf table for all the period lengths the user can choose from. Or you can use the rangesum function. Something like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #0000ff;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;sum(aggr(rangesum&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #0000ff;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;above&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #0000ff;"&gt;&lt;SPAN lang="en-US" style="font-style: inherit; font-family: inherit;"&gt;total s&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #0000ff;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;um&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;({&amp;lt;Month=&amp;gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #800000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;Amount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;),0,$(&lt;EM&gt;vNoOfMonths)&lt;/EM&gt;)),Month))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;where vNoOfMonths is a variable for the number of months which the user gets to choose. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: verdana, geneva; color: #000000;"&gt;&lt;SPAN lang="en" style="font-style: inherit; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 11:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599474#M221912</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-02-03T11:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating Previous Rows in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599475#M221913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a n As Of Table how would I know which period in this table to use based on the row number in the straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spent a lot of time trying to use the rangesum approach and had it working perfectly for one manager. The problem came when I wanted to represent multiple managers on a chart because the dimension ordering changed from Manager &amp;gt; Department &amp;gt; Month to Month &amp;gt; Manager &amp;gt; Department which meant that the range sum was looking at the wrong rows for its aggregation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 11:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-Previous-Rows-in-a-Straight-Table/m-p/599475#M221913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-03T11:39:41Z</dc:date>
    </item>
  </channel>
</rss>

