<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521192#M599309</link>
    <description>&lt;P&gt;My understanding is that you want all data&amp;nbsp;&lt;STRONG&gt;from a year ago till max year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Try below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sum({1&amp;lt;YearMonth={"&amp;gt;=$(&lt;SPAN&gt;date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM')&lt;/SPAN&gt;)"}&amp;gt;}Product_Sales)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Dec 2018 18:35:59 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2018-12-14T18:35:59Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521188#M599305</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am again struggling with the set analysis in Qlik &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to replace&amp;nbsp; in the following formula the '201701'&amp;nbsp; by the the last 12 months:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sum({1&amp;lt;YearMonth={201701}&amp;gt;}Product_Sales) // itworks&amp;nbsp;&lt;/P&gt;&lt;P&gt;To calculate the last 12 months I used:&lt;/P&gt;&lt;P&gt;date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM')&amp;nbsp; /it works&lt;/P&gt;&lt;P&gt;However, when trying to replace 201701 by the last 12 months formula above, it did not work...&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;P.S: YearMonth it is field from my Fact table. I used "1" identifier because I wanted to ignore all selections&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 17:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521188#M599305</guid>
      <dc:creator>Zaga_69</dc:creator>
      <dc:date>2018-12-14T17:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521192#M599309</link>
      <description>&lt;P&gt;My understanding is that you want all data&amp;nbsp;&lt;STRONG&gt;from a year ago till max year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Try below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sum({1&amp;lt;YearMonth={"&amp;gt;=$(&lt;SPAN&gt;date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM')&lt;/SPAN&gt;)"}&amp;gt;}Product_Sales)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 18:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521192#M599309</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2018-12-14T18:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521244#M599312</link>
      <description>&lt;P&gt;This is not a direct answer, but I think reading/reviewing the link below will give ideas on how to proceed. I found this extremely helpful when I was working on a project that needed analysis of data over time periods:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/2012/01/easy-period-analysis-using-qlikview-components/" target="_blank"&gt;https://qlikviewcookbook.com/2012/01/easy-period-analysis-using-qlikview-components/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 21:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521244#M599312</guid>
      <dc:creator>jlongoria</dc:creator>
      <dc:date>2018-12-14T21:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521447#M599314</link>
      <description>&lt;P&gt;If you want last year of same month, Just use like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1&amp;lt;YearMonth={"$(=date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM'))"}&amp;gt;}Product_Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want last year of same month to this this month, Just use like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1&amp;lt;YearMonth={"&amp;gt;=$(=date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM'))&amp;lt;=$(=date(=Max(YearMonth, 'YYYYMM')))"}&amp;gt;}Product_Sales)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 08:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1521447#M599314</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-12-17T08:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522525#M599316</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you! the first expression was what I was exactly looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the he second one, I did not get your idea.&lt;/P&gt;&lt;P&gt;One comment:&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following formula&amp;nbsp;when nothing is selecting in the Filter Pane (YearMonth) it brings the sales for the maximum (YearMonth - 12). Is there anyway when a period is selecting to show nothing or zero?&lt;/P&gt;&lt;P&gt;sum({1&amp;lt;YearMonth={"$(=date(addmonths((date#(max(YearMonth),'YYYYMM')),-12),'YYYYMM'))"}&amp;gt;}Product_Sales)&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Edi&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 10:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522525#M599316</guid>
      <dc:creator>Zaga_69</dc:creator>
      <dc:date>2018-12-19T10:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522531#M599318</link>
      <description>&lt;P&gt;I realized that just deleting the "max" function of the formula, it brings 0 when selecting nothing in the filter pane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 10:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522531#M599318</guid>
      <dc:creator>Zaga_69</dc:creator>
      <dc:date>2018-12-19T10:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522804#M599320</link>
      <description>&lt;P&gt;I apologies for late reply, Glad we were able to help and found your self.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 03:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/1522804#M599320</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-12-20T03:36:20Z</dc:date>
    </item>
  </channel>
</rss>

