<?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 Calculate 18 month rolling in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166170#M503779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering about using this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sum(if(Date&amp;gt;addmonths(today(),-18),Sales))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm not sure if this expression is correct. But now this is only way wchich is on my mind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2009 19:49:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-26T19:49:49Z</dc:date>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166166#M503775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I tried to calculate a sum of a value during the last 18 month, but I think I'm doing something terribly wrong. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My code to calculate the value is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;sum&lt;BR /&gt;&lt;BR /&gt;({&amp;lt;REPORTDAT_date = {'&amp;gt;=$(=AddMonths(makedate( (=Only(YEAR)), '04', '01' ), -18))&amp;lt;=$(=makedate( (=Only(YEAR)), '03', '31' ))'}&amp;gt;} REPORTNRCOUNT)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If I select a year I receive only the calculated value of the selected year, not the value of 18 month. I'm using QlikView 8.5 and the editor always says that the expression is OK.&lt;/P&gt;&lt;P&gt;Could you please help me to find the cause of my error? I think it has to do something with the $ sign?&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bettina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 17:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166166#M503775</guid>
      <dc:creator />
      <dc:date>2009-11-26T17:13:49Z</dc:date>
    </item>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166167#M503776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure - but probably the problem is in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Only(YEAR)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 17:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166167#M503776</guid>
      <dc:creator />
      <dc:date>2009-11-26T17:29:04Z</dc:date>
    </item>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166168#M503777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Magda,&lt;/P&gt;&lt;P&gt;thank you for your quik answer!&lt;/P&gt;&lt;P&gt;This was also my thought. But I would like to query the selected year and calculate the 18 month rolling with the year the user selected in a list. Isn't this possible?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bettina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 17:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166168#M503777</guid>
      <dc:creator />
      <dc:date>2009-11-26T17:36:26Z</dc:date>
    </item>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166169#M503778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi bettina,&lt;/P&gt;&lt;P&gt;i have 12M, 6M and 2M rolling and just select one month and one year..........&lt;BR /&gt;for this solution i did a variable vPeriode12M: {$&amp;lt;Year=, Month=, YearMonthRolling= {"&amp;lt;=$(=Month + Year * 100) &amp;gt;=$(=Month - 11 + if(Month &amp;lt;= 11, 12, 0) + if(Month &amp;lt;= 11, Year - 1, Year) * 100)"}-{"****00"}&amp;gt;}&lt;BR /&gt;(YearMonthRolling is a field (200901,200902 etc.) and {"****00*} is the YTD that i don't need for the rolling months!)&lt;BR /&gt;and the statement is sum( $(vPeriode12M) figure)&lt;/P&gt;&lt;P&gt;regards,&lt;BR /&gt;corleone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 19:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166169#M503778</guid>
      <dc:creator />
      <dc:date>2009-11-26T19:14:37Z</dc:date>
    </item>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166170#M503779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering about using this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sum(if(Date&amp;gt;addmonths(today(),-18),Sales))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm not sure if this expression is correct. But now this is only way wchich is on my mind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 19:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166170#M503779</guid>
      <dc:creator />
      <dc:date>2009-11-26T19:49:49Z</dc:date>
    </item>
    <item>
      <title>Calculate 18 month rolling</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166171#M503780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checking your syntax it happens to me that you have to use&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;$(=Only(YEAR))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;Instead of &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;(=Only(YEAR))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;as you are using a function inside a set analysis (similar to which you are actually doing with $(AddMonths...)&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Just that little change and your expression will be fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 19:56:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-18-month-rolling/m-p/166171#M503780</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2009-11-26T19:56:15Z</dc:date>
    </item>
  </channel>
</rss>

