<?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 Reference to outer aggr current “cursor” position from an inner aggr or set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reference-to-outer-aggr-current-cursor-position-from-an-inner/m-p/427328#M159219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Assuming we have a set of numbered weeks (for example, 1-100).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;I want to create a minichart where for the last 8 weeks I am showing 4-weeks avg.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;This would work, if the weeks were preordered (could somebody hint how this could be enforced?):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=vCurrWeekNo)&amp;gt;$(=vCurrWeekNo - 8)'}&amp;gt; } &lt;/P&gt;&lt;P&gt; aggr(rangesum (above(sum(amt),0,4)), dim1, weekno)&lt;/P&gt;&lt;P&gt; ), dim1, weekno)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Alternative would be using something similar to &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;CurrentWeekNo() (could not figure out how to use top()/above(), etc for this)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=vCurrWeekNo)&amp;gt;$(=vCurrWeekNo - 8)'}&amp;gt; } &lt;/P&gt;&lt;P&gt; aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=CurrentWeekNo())&amp;gt;$(=CurrentWeekNo() - 4)'}&amp;gt; } amt)&lt;/P&gt;&lt;P&gt;), dim1, weekno)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;I am missing something basic… would appreciate the help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 May 2013 07:33:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-06T07:33:47Z</dc:date>
    <item>
      <title>Reference to outer aggr current “cursor” position from an inner aggr or set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-to-outer-aggr-current-cursor-position-from-an-inner/m-p/427328#M159219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Assuming we have a set of numbered weeks (for example, 1-100).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;I want to create a minichart where for the last 8 weeks I am showing 4-weeks avg.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;This would work, if the weeks were preordered (could somebody hint how this could be enforced?):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=vCurrWeekNo)&amp;gt;$(=vCurrWeekNo - 8)'}&amp;gt; } &lt;/P&gt;&lt;P&gt; aggr(rangesum (above(sum(amt),0,4)), dim1, weekno)&lt;/P&gt;&lt;P&gt; ), dim1, weekno)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Alternative would be using something similar to &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;CurrentWeekNo() (could not figure out how to use top()/above(), etc for this)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=vCurrWeekNo)&amp;gt;$(=vCurrWeekNo - 8)'}&amp;gt; } &lt;/P&gt;&lt;P&gt; aggr(sum({&amp;lt;weekno= {'&amp;lt;=$(=CurrentWeekNo())&amp;gt;$(=CurrentWeekNo() - 4)'}&amp;gt; } amt)&lt;/P&gt;&lt;P&gt;), dim1, weekno)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;I am missing something basic… would appreciate the help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 07:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-to-outer-aggr-current-cursor-position-from-an-inner/m-p/427328#M159219</guid>
      <dc:creator />
      <dc:date>2013-05-06T07:33:47Z</dc:date>
    </item>
  </channel>
</rss>

