<?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 Set analysis trouble in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486988#M1134263</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 am new with QlikView and i have a problem with set analysis.&lt;/P&gt;&lt;P&gt;I have to create a variable that brings the average of forecasts for the first 3 months of the year (the first trimester) for each family of products.&lt;/P&gt;&lt;P&gt;The formula I have to create is pretty simple and I think it should be something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_MONTH_OF_YEAR={1,2,3}&amp;gt;} Forecast)/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but just doesn’t seem to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="forecast.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/48626_forecast.png" style="font-size: 10pt; line-height: 1.5em; width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Nov 2013 10:48:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-06T10:48:47Z</dc:date>
    <item>
      <title>Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486988#M1134263</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 am new with QlikView and i have a problem with set analysis.&lt;/P&gt;&lt;P&gt;I have to create a variable that brings the average of forecasts for the first 3 months of the year (the first trimester) for each family of products.&lt;/P&gt;&lt;P&gt;The formula I have to create is pretty simple and I think it should be something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_MONTH_OF_YEAR={1,2,3}&amp;gt;} Forecast)/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but just doesn’t seem to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG alt="forecast.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/48626_forecast.png" style="font-size: 10pt; line-height: 1.5em; width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 10:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486988#M1134263</guid>
      <dc:creator />
      <dc:date>2013-11-06T10:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486989#M1134265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your month values numbers or text values, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_MONTH_OF_YEAR={Jan, Feb, Mar}&amp;gt;} Forecast)/3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 10:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486989#M1134265</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-11-06T10:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486990#M1134267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does the data look like in your field MONTH_MONTH_OF_YEAR? Some other factors might come up. the fastest way to get answer is to share a sample app of yours.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 10:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486990#M1134267</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-11-06T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486991#M1134268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;MONTH_MONTH_OF_YEAR&lt;/SPAN&gt; is a number (from 1 to 12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable Forecast is made like this:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vACT/FCT)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;/&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vPYPRICEAVG)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;*100 &lt;/SPAN&gt;&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: 'Arial','sans-serif'; color: black;"&gt;Where &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;vACT/FCT = &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;ISNULL&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vActPrice)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;), &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vFCTPriceMaterial)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vActPrice)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;vPYPRICEAVG = &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;((&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vPYpriceRicostruito)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;*&lt;BR /&gt; (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vACTFCTQTY)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;))&lt;BR /&gt; /&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;$(vACTFCTQTYMATGRP)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;MAT_MATERIAL_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;MONTH_MONTH_OF_YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;)) &lt;/SPAN&gt;&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: 'Arial','sans-serif'; color: black;"&gt;It’s kind of a big cascade here but all others work just fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 10:56:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486991#M1134268</guid>
      <dc:creator />
      <dc:date>2013-11-06T10:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486992#M1134269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be your selection in other fields reducing data, try using '1' in set to disregard selections, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;lt;MONTH_MONTH_OF_YEAR={1,2,3}&amp;gt;} Forecast)/3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 11:01:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486992#M1134269</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-11-06T11:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486993#M1134270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work like this either..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 11:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486993#M1134270</guid>
      <dc:creator />
      <dc:date>2013-11-06T11:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486994#M1134271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I guess you have to use the same set logic in the other Sum() which comes in variable as well , like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;vPYPRICEAVG=&lt;/EM&gt;&lt;/STRONG&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;({&amp;lt;MONTH_MONTH_OF_YEAR={1,2,3}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;((&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;$(vPYpriceRicostruito)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;*&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 11:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486994#M1134271</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-11-06T11:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486995#M1134272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;MONTH_MONTH_OF_YEAR={'1','2','3'}&amp;gt;} Forecast)/3&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 11:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486995#M1134272</guid>
      <dc:creator>davidrobles</dc:creator>
      <dc:date>2013-11-06T11:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486996#M1134273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume it's not about the set expression for your Month field, but about your forecast variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this work?&lt;/P&gt;&lt;P&gt;=sum(Forecast)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume it doesn't. It's hard to follow your sequence of variables, but please carefully read Henrics latest technical design blog post about variable evaluation in expressions.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure the variable expands correctly? And you don't run into trouble using aggregation functions within an aggregation function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 11:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486996#M1134273</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-11-06T11:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486997#M1134274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I managed to resolve the problem by creating a field in the script that brings me the quarters. I also reviewed the variables and made some changes and now seems to be ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your recommendation about "The magic of variables", it all seems a bit clearer now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 13:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-trouble/m-p/486997#M1134274</guid>
      <dc:creator />
      <dc:date>2013-11-07T13:56:50Z</dc:date>
    </item>
  </channel>
</rss>

