<?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: Calculate the same last year period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172024#M520041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wonderful explanation! the best as usual! thank you Sunny! &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 21:21:12 GMT</pubDate>
    <dc:creator>caccio88</dc:creator>
    <dc:date>2016-09-08T21:21:12Z</dc:date>
    <item>
      <title>Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172018#M520035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i want is to compare year to date period with the same last year period. The max date of my data is July 2016 and the year starts in March 2016. I've already created my new fiscal year from March to February but I can't do the right calculation of the last year in the same period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end I want the value from March 2015 to July 2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried reading this &lt;A href="https://community.qlik.com/qlik-blogpost/3619"&gt;Year-over-Year Comparisons&lt;/A&gt;, but wasn't so helpful for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here attached my example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="171708" data-objecttype="3" href="https://community.qlik.com/people/stalwar1"&gt;stalwar1&lt;/A&gt; &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="15823" data-objecttype="3" href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt; &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="96544" data-objecttype="3" href="https://community.qlik.com/people/gwassenaar"&gt;gwassenaar&lt;/A&gt; &lt;A _jive_internal="true" class="jiveTT-hover-user jive-link-profile-small" data-containerid="-1" data-containertype="-1" data-objectid="21667" data-objecttype="3" href="https://community.qlik.com/people/cleveranjos"&gt;cleveranjos&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 17:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172018#M520035</guid>
      <dc:creator>caccio88</dc:creator>
      <dc:date>2016-09-08T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172019#M520036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the best solution would be using a As-Of table with proper flag to what you need&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 17:53:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172019#M520036</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-09-08T17:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172020#M520037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DataMonthYear ={"$(='&amp;gt;=' &amp;amp; Date(YearStart(Max(DataMonthYear),-1, 3), 'MMM-YYYY') &amp;amp; '&amp;lt;=' &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(='Date(AddYears(Max({&amp;lt;DataMonthYear = {' &amp;amp; Chr(34) &amp;amp; '=Sum({&amp;lt;CATEGORY={' &amp;amp; Chr(39) &amp;amp; 'ACTUAL' &amp;amp; Chr(39) &amp;amp; '}, ACCOUNT={' &amp;amp; Chr(39) &amp;amp; 'CFFCF' &amp;amp; Chr(39) &amp;amp; '}&amp;gt;}Measures2)' &amp;amp; Chr(34) &amp;amp; '}&amp;gt;}DataMonthYear), -1), ' &amp;amp; Chr(39) &amp;amp; 'MMM-YYYY' &amp;amp; Chr(39) &amp;amp; ')'))"}, CATEGORY={'ACTUAL'},ACCOUNT={'CFFCF'}&amp;gt;} Measures2)/1000000&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 19:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172020#M520037</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-08T19:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172021#M520038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The results is perfect! Thank you Sunny! &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ But I can't clearly understand how it works...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 20:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172021#M520038</guid>
      <dc:creator>caccio88</dc:creator>
      <dc:date>2016-09-08T20:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172022#M520039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;I had to go through a painful process of making it to work . I am outside for a little bit, but can brief you on how its working once I am near my computer .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 20:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172022#M520039</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-08T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172023#M520040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;='&amp;gt;=' &amp;amp; Date(YearStart(Max(DataMonthYear),-1, 3), 'MMM-YYYY') &amp;amp; '&amp;lt;=' &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(='Date(AddYears(Max({&amp;lt;DataMonthYear = {' &amp;amp; Chr(34) &amp;amp; '=Sum({&amp;lt;CATEGORY={' &amp;amp; Chr(39) &amp;amp; 'ACTUAL' &amp;amp; Chr(39) &amp;amp; '}, ACCOUNT={' &amp;amp; Chr(39) &amp;amp; 'CFFCF' &amp;amp; Chr(39) &amp;amp; '}&amp;gt;}Measures2)' &amp;amp; Chr(34) &amp;amp; '}&amp;gt;}DataMonthYear), -1), ' &amp;amp; Chr(39) &amp;amp; 'MMM-YYYY' &amp;amp; Chr(39) &amp;amp; ')')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in a text box object gives you the range you needed&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/136890_Capture.PNG" style="height: 192px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Mar-2015 was easy to get&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Date(YearStart(Max(DataMonthYear),-1, 3), 'MMM-YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But July-2016 was difficult because the max date was Feb-2017, but for this particular expression &lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Sum({&amp;lt;CATEGORY={'ACTUAL'},ACCOUNT={'CFFCF'}&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;&amp;gt;} Measures2)&lt;/STRONG&gt; the max date was July-2016. To get this, I had to use a set analysis, but doing a double quote within a double quote is an issue, so I had to use a dollar sign expansion to get this to work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;$(='Date(AddYears(Max({&amp;lt;DataMonthYear = {' &amp;amp; Chr(34) &amp;amp; '=Sum({&amp;lt;CATEGORY={' &amp;amp; Chr(39) &amp;amp; 'ACTUAL' &amp;amp; Chr(39) &amp;amp; '}, ACCOUNT={' &amp;amp; Chr(39) &amp;amp; 'CFFCF' &amp;amp; Chr(39) &amp;amp; '}&amp;gt;}Measures2)' &amp;amp; Chr(34) &amp;amp; '}&amp;gt;}DataMonthYear), -1), ' &amp;amp; Chr(39) &amp;amp; 'MMM-YYYY' &amp;amp; Chr(39) &amp;amp; ')')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above gives me July-2015 because I use &lt;STRONG&gt;AddYears(July-2016, -1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help explain what the expression is doing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 21:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172023#M520040</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-08T21:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172024#M520041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wonderful explanation! the best as usual! thank you Sunny! &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 21:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172024#M520041</guid>
      <dc:creator>caccio88</dc:creator>
      <dc:date>2016-09-08T21:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172025#M520042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ tha solution works without other selection but if I select on DataMonthYear like Jul-16 the set doesn't works.... so with the selection mentioned before we don't have -1,68 ( the value of Jul-15) but always -61,70.&lt;/P&gt;&lt;P&gt;Any idea for this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 06:18:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172025#M520042</guid>
      <dc:creator>caccio88</dc:creator>
      <dc:date>2016-09-09T06:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172026#M520043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't the idea of YTD to show always show a YTD number even if you select a single MonthYear? When you select Jul-2016, showing Jul-2016's number would defeat the purpose, no? I see that your current year's expression is doing that and we might be able to configure your other expression to do that as well, but currently your last year's expression is behaving like a true YTD expression which does change when you select Jun-2016 by summing up the number from Mar-2016 till Jun-2016. Is this not what you would want and see just one month's number on selection of a month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172026#M520043</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-09T07:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172027#M520044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the expression which will meet your requirement of selection of a particular month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DataMonthYear = {"$(='&amp;gt;=' &amp;amp; If(GetSelectedCount(DataMonthYear) &amp;gt;= 1, Date(AddYears(Min(DataMonthYear), -1), 'MMM-YYYY'), Date(YearStart(Max(DataMonthYear),-1, 3), 'MMM-YYYY')) &amp;amp; '&amp;lt;=' &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(='Date(AddYears(Max({&amp;lt;DataMonthYear = {' &amp;amp; Chr(34) &amp;amp; '=Sum({&amp;lt;CATEGORY={' &amp;amp; Chr(39) &amp;amp; 'ACTUAL' &amp;amp; Chr(39) &amp;amp; '}, ACCOUNT={' &amp;amp; Chr(39) &amp;amp; 'CFFCF' &amp;amp; Chr(39) &amp;amp; '}&amp;gt;}Measures2)' &amp;amp; Chr(34) &amp;amp; '}&amp;gt;}DataMonthYear), -1), ' &amp;amp; Chr(39) &amp;amp; 'MMM-YYYY' &amp;amp; Chr(39) &amp;amp; ')'))"},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CATEGORY={'ACTUAL'},ACCOUNT={'CFFCF'}&amp;gt;} Measures2)/1000000&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172027#M520044</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-09T07:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the same last year period</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172028#M520045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly what I was looking for! thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-same-last-year-period/m-p/1172028#M520045</guid>
      <dc:creator>caccio88</dc:creator>
      <dc:date>2016-09-09T07:42:03Z</dc:date>
    </item>
  </channel>
</rss>

