<?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 on current selection for last year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-current-selection-for-last-year/m-p/1276993#M516916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two formulas which will do next:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum({&amp;lt;SalesDate = {"&amp;gt;=$(=MonthStart(AddMonths(Today(),-1)))&amp;nbsp; &amp;lt;= $(=MonthEnd(AddMonths(Today(),-1)))"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this Set Analysis formula to select only the previous month. In my current selections box, I have selected every month in the current year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(sum({&amp;lt;Year=, MonthName={'&amp;gt;=$(#=AddMonths(min(MonthName),-12))&amp;nbsp; &amp;lt;=$(#=AddMonths(max(MonthName),-12))'}, Month = ,Day = &amp;gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have this formule which will give me, based on the current selections, the sales based on last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to combine these formulas. When I select the months January and February, I would like to see the sales based on last years February.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a simple solution for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Timo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Mar 2017 13:01:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-03-24T13:01:50Z</dc:date>
    <item>
      <title>Set Analysis on current selection for last year</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-current-selection-for-last-year/m-p/1276993#M516916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two formulas which will do next:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum({&amp;lt;SalesDate = {"&amp;gt;=$(=MonthStart(AddMonths(Today(),-1)))&amp;nbsp; &amp;lt;= $(=MonthEnd(AddMonths(Today(),-1)))"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this Set Analysis formula to select only the previous month. In my current selections box, I have selected every month in the current year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(sum({&amp;lt;Year=, MonthName={'&amp;gt;=$(#=AddMonths(min(MonthName),-12))&amp;nbsp; &amp;lt;=$(#=AddMonths(max(MonthName),-12))'}, Month = ,Day = &amp;gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have this formule which will give me, based on the current selections, the sales based on last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to combine these formulas. When I select the months January and February, I would like to see the sales based on last years February.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a simple solution for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Timo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-current-selection-for-last-year/m-p/1276993#M516916</guid>
      <dc:creator />
      <dc:date>2017-03-24T13:01:50Z</dc:date>
    </item>
  </channel>
</rss>

