<?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: Set analysis help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764124#M271626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set in set analysis is calculated only once, at the start of chart recalculation and not row-by-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use an AsOf table to solve this problem. See this document &lt;A _jive_internal="true" data-containerid="2049" data-containertype="14" data-objectid="4252" data-objecttype="102" href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt; for an explanation of why set analysis doesn't work and how AsOf tables can solve most of these rolling period-related problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Feb 2015 09:41:23 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-02-08T09:41:23Z</dc:date>
    <item>
      <title>Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764123#M271625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would appreciate some help with set analysis for the following case:&lt;/P&gt;&lt;P&gt;2 data tables:&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- Inventory data with the fields &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;SupCode, Inventory&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;- Sales Data with the fields &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales_Date&lt;/SPAN&gt;, Sales&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;A straight table with the dimensions:&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- Supplier Code&lt;/LI&gt;&lt;LI&gt;- Supply Date&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-left: .25in;"&gt;For each supply date, the table should show total inventory&amp;nbsp; for the Supply Date,&amp;nbsp; and total sales for a period of 30 days previous to that Supply date. &lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;To calculate the sales, I wrote the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;gt;$(= date(Supply_Date -30)) &amp;lt;=$(=date(Supply_Date))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;SupCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it works only if a certain supply date is selected. Otherwise, null values are displayed.&lt;/P&gt;&lt;P&gt;Can someone assist me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Feb 2015 09:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764123#M271625</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2015-02-08T09:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764124#M271626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set in set analysis is calculated only once, at the start of chart recalculation and not row-by-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use an AsOf table to solve this problem. See this document &lt;A _jive_internal="true" data-containerid="2049" data-containertype="14" data-objectid="4252" data-objecttype="102" href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt; for an explanation of why set analysis doesn't work and how AsOf tables can solve most of these rolling period-related problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Feb 2015 09:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764124#M271626</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-02-08T09:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764125#M271627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Feb 2015 10:30:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/764125#M271627</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2015-02-08T10:30:06Z</dc:date>
    </item>
  </channel>
</rss>

