<?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: Linest &amp; Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476167#M177825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks swuel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed this is what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jan 2014 07:09:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-08T07:09:54Z</dc:date>
    <item>
      <title>Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476164#M177822</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;&lt;/P&gt;&lt;P&gt;I have a problem with generating a custom trendline (based on linest m &amp;amp; linest b functions) and combining it with a set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 12 monthly figures representing sales, through Sept 2012 - Aug 2013. Here a prerequisite is that when I choose &lt;STRONG&gt;one &lt;/STRONG&gt;month the previous 11 months + the currently selected month is visible in the chart. For this I inject a set analysis like:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;( { &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&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;"&amp;gt;=$(='201209') &amp;lt;=$(=max(Month))"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (nevermind the hardcoding of the monthnum)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So now I want to create a trendline which &lt;STRONG&gt;only &lt;/STRONG&gt;plots the trend for the sales in 2013. I figured I inject the same set expression into the linest expression as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;( { &amp;lt;&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; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&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;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; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sales&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;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&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;&lt;BR /&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;linest_b&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( { &amp;lt;&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; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&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;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; ={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sales&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;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;However this only returns a dot. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have experimented without the set analysis, in fact selecting the entire period. And it Works fine with the manual linest trendline, however it is a requirement that the set expression is included, due to the fact that I want to choose only one month and get the rolling 12M figures displayed in the chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please see my attached example, for further understanding. In the file a "QV generated" trendline is plotted for the Whole series (blue line). And the manual trendline that I am trying to create is visible as a red dot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any ideas on how to solve this problem??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;David&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476164#M177822</guid>
      <dc:creator />
      <dc:date>2014-01-07T15:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476165#M177823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;linest_m(total aggr(sum( { &amp;lt;Year =, Month ={"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"}&amp;gt;}&amp;nbsp; Sales),Month),Month)*Month&lt;/P&gt;&lt;P&gt;+linest_b(total aggr(sum( { &amp;lt;Year =, Month ={"&amp;gt;=$(='201301') &amp;lt;=$(=max(Month))"}&amp;gt;}&amp;nbsp; Sales),Month),Month)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476165#M177823</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-07T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476166#M177824</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;linest_m( { &amp;lt;Year =, Month ={"&amp;gt;=201301&amp;lt;=$(=max(Month))"}&amp;gt;} total aggr( sum( { &amp;lt;Year =, Month ={"&amp;gt;=201301&amp;lt;=$(=max(Month))"}&amp;gt;}&amp;nbsp; Sales),Month),Month )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*only({ &amp;lt;Year =, Month ={"&amp;gt;=201301&amp;lt;=$(=max(Month))"}&amp;gt;}Month)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;+linest_b( { &amp;lt;Year =, Month ={"&amp;gt;=201301&amp;lt;=$(=max(Month))"}&amp;gt;} total aggr(sum( { &amp;lt;Year =, Month ={"&amp;gt;=201301&amp;lt;=$(=max(Month))"}&amp;gt;}&amp;nbsp; Sales),Month),Month )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476166#M177824</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-01-07T15:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476167#M177825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks swuel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed this is what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 07:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476167#M177825</guid>
      <dc:creator />
      <dc:date>2014-01-08T07:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476168#M177826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicole for your input&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 07:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476168#M177826</guid>
      <dc:creator />
      <dc:date>2014-01-08T07:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linest &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476169#M177827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx, could u plz explain whether u always need to use Total aggr or is there a situation where only aggr is relevant, according the reference manual it should always be there. What difference would it make?&lt;/P&gt;&lt;P&gt;I have the same question for Only(), when to include it and when should u leave it out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 22:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linest-Set-Analysis/m-p/476169#M177827</guid>
      <dc:creator />
      <dc:date>2015-06-05T22:37:28Z</dc:date>
    </item>
  </channel>
</rss>

