<?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 Year Month Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250139#M94992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&amp;nbsp; It worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Balaji Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2012 13:12:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-01-04T13:12:36Z</dc:date>
    <item>
      <title>Year Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250137#M94990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish you all a very happy New Year 2012!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script, I use the following functions to calculate 'YearMonth' and it returns the value as for example: Jan 2012 as '201201'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year([Posting Date]) as Year,&lt;/P&gt;&lt;P&gt;Month([Posting Date]) as Month,&lt;/P&gt;&lt;P&gt;Year([Posting Date]) &amp;amp; num(Month([Posting Date]) ,'00') as YearMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my expression, I am using a formula to calculate the transactions that were made on last month.&amp;nbsp; The expression i use is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=max(YearMonth) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Till last month, I didnt face any issues because when I used this function and when the max Year Month was '201112', the expression was returning the value '201111'.&amp;nbsp; But this month, it is returning a value '201200' (201201 - 1 is 201200) and because of this my whole report is going for a toss.&amp;nbsp; Can anyone help me to get out of this situation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Balaji Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 12:55:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250137#M94990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-04T12:55:53Z</dc:date>
    </item>
    <item>
      <title>Year Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250138#M94991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try defining your YearMonth as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(monthstart([Posting Date]),'YYYYMM') as YearMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead, then use &lt;/P&gt;&lt;P&gt;=Date(addmonths(max(YearMonth),-1),'YYYYMM')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 13:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250138#M94991</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-04T13:02:50Z</dc:date>
    </item>
    <item>
      <title>Year Month Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250139#M94992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&amp;nbsp; It worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Balaji Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 13:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-Month-Calculation/m-p/250139#M94992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-04T13:12:36Z</dc:date>
    </item>
  </channel>
</rss>

