<?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: Compare 2 timeperiods in which first periode is not only in one year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298754#M110766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi newqlikie,&lt;/P&gt;&lt;P&gt;This case seems similar with mine, would you attach the qlikview file, i really need an example &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2012 12:31:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-28T12:31:07Z</dc:date>
    <item>
      <title>Compare 2 timeperiods in which first periode is not only in one year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298751#M110763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I have the next problem by comparing two time periods. Comparing the periods where all dates are in one year is ok.&lt;/P&gt;&lt;P&gt;Now I have the problem by comparing the periods, where the startdate is one year before the enddate (e.g. startdate 01.10.2010 and enddate is 30.09.2011)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I need the compared timeperiod one year befor (e.g. startdate 01.10.2009 and enddate is 30.09.2010).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it with following formula without success:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;sum({&amp;lt;(JARECDAT &amp;gt;= makedate(year(vMinDatum)-1,month(vMinDatum),day(vMinDatum)) and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JARECDAT &amp;lt;= makedate(year(vMaxDatum)-1,month(vMaxDatum),day(vMaxDatum)))&amp;gt;} Umsatz)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JARECDAT= Each date of all years (eg. 01.01.2009, 02.01.2009, 03.01.2009 ... 28.09.2011)&lt;/P&gt;&lt;P&gt;vMinDatum = Variable where I pick the startdate&lt;/P&gt;&lt;P&gt;vMaxDatum = Variable where I pick the enddate&lt;/P&gt;&lt;P&gt;Umsatz= turnover, which I trie to compare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone has an idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewQlikie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 10:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298751#M110763</guid>
      <dc:creator>newqlikie</dc:creator>
      <dc:date>2011-09-29T10:01:35Z</dc:date>
    </item>
    <item>
      <title>Compare 2 timeperiods in which first periode is not only in one year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298752#M110764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE class="jive-code jive-sql"&gt;&lt;SPAN class="jive-sql-keyword"&gt;sum&lt;/SPAN&gt;({&amp;lt;(JARECDAT = {"&amp;gt;=$(=Addmonths(vMinDatum,-12))&amp;lt;=$(=Addmonths(vMaxDatum,-12))"}&amp;gt;} Umsatz)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code jive-sql"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code jive-sql"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 10:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298752#M110764</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-09-29T10:17:52Z</dc:date>
    </item>
    <item>
      <title>Compare 2 timeperiods in which first periode is not only in one year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298753#M110765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. That works perfectly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewQlikie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 10:46:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298753#M110765</guid>
      <dc:creator>newqlikie</dc:creator>
      <dc:date>2011-09-29T10:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 timeperiods in which first periode is not only in one year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298754#M110766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi newqlikie,&lt;/P&gt;&lt;P&gt;This case seems similar with mine, would you attach the qlikview file, i really need an example &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 12:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-2-timeperiods-in-which-first-periode-is-not-only-in-one/m-p/298754#M110766</guid>
      <dc:creator />
      <dc:date>2012-08-28T12:31:07Z</dc:date>
    </item>
  </channel>
</rss>

