<?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 for last 12 months in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1870320#M71854</link>
    <description>&lt;P&gt;Hi, I need set analysis for&lt;/P&gt;
&lt;P&gt;1. last 12 months.&lt;/P&gt;
&lt;P&gt;2. for every year&lt;/P&gt;
&lt;P&gt;How do I do it?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Dec 2021 11:41:32 GMT</pubDate>
    <dc:creator>Lalita_Rai</dc:creator>
    <dc:date>2021-12-14T11:41:32Z</dc:date>
    <item>
      <title>Set Analysis for last 12 months</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1870320#M71854</link>
      <description>&lt;P&gt;Hi, I need set analysis for&lt;/P&gt;
&lt;P&gt;1. last 12 months.&lt;/P&gt;
&lt;P&gt;2. for every year&lt;/P&gt;
&lt;P&gt;How do I do it?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1870320#M71854</guid>
      <dc:creator>Lalita_Rai</dc:creator>
      <dc:date>2021-12-14T11:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for last 12 months</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1870421#M71865</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If my understanding is correct then for the first point you are looking for something like this:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;({&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;={"&amp;gt;$(=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;MonthStart&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;AddMonths&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Today&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(), -11)))"}&amp;gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This expression sums the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Value &lt;/STRONG&gt;&lt;/SPAN&gt;for all the dates grater than 11 months older than the current one. &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Today&lt;/STRONG&gt;&lt;/SPAN&gt;() will return &lt;SPAN style="color:#2ecc71"&gt;&lt;STRONG&gt;"14/12/2021"&lt;/STRONG&gt;&lt;/SPAN&gt; therefore going back 11 months will return &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"14/1/2021"&lt;/STRONG&gt;&lt;/SPAN&gt;. Adding the &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;MonthStart&lt;/STRONG&gt;&lt;/SPAN&gt;() function will give us &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;"1/1/2021"&lt;/STRONG&gt;&lt;/SPAN&gt;. If current moth was &lt;STRONG&gt;November&lt;/STRONG&gt;, then the result would have been &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/12/2020" &lt;/STRONG&gt;&lt;/SPAN&gt;etc. You can modify this expression based on your needs. For example, if you are looking for 12 months before the last date in the dataset, then you will replace &lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;Today&lt;/SPAN&gt;() &lt;/STRONG&gt;with&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Max&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; etc.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regarding your second part, can you please provide a context in which you need this set analysis? Are you looking to create a table where you are going to display all the years and then all the sums of the values for those years?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1870421#M71865</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2021-12-14T14:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for last 12 months</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1871203#M71901</link>
      <description>Hi, Andrei,&lt;BR /&gt;&lt;BR /&gt;Thank you for the first answer. That helped a lot.&lt;BR /&gt;&lt;BR /&gt;With regards to the second question, I might have misunderstood it.Just&lt;BR /&gt;ignore it.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Lalita&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Dec 2021 01:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-for-last-12-months/m-p/1871203#M71901</guid>
      <dc:creator>Lalita_Rai</dc:creator>
      <dc:date>2021-12-15T01:10:22Z</dc:date>
    </item>
  </channel>
</rss>

