<?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: Addmonths function with a negative integer in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215416#M621792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(AddMonths(FiscalDate, -1) + 25) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(FiscalDate, 'YYYY-MM') as Period;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2015, 12, 31) + IterNo()) as FiscalDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt;= 366;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2017 15:54:26 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-01-23T15:54:26Z</dc:date>
    <item>
      <title>Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215407#M621783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to change the start date of periods from 1st day of month to 26th day of previous month. &lt;/P&gt;&lt;P&gt;For example, For December 2016 Period, it should be between November 26, 2016 and December 25,&amp;nbsp; 2017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I'm trying to load below, qlikview does not subtract a month but adds it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;MonthStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;FiscalDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;+25),-1), 'YYYY-MM') as Period&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Could you please help me to solve this?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 12:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215407#M621783</guid>
      <dc:creator>ieuyar</dc:creator>
      <dc:date>2017-01-23T12:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215408#M621784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(AddMonths(MonthStart(FiscalDate),-1)&lt;SPAN style="color: #ff0000;"&gt;+25&lt;/SPAN&gt;, 'YYYY-MM') as Period&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 12:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215408#M621784</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T12:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215409#M621785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, it did not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 12:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215409#M621785</guid>
      <dc:creator>ieuyar</dc:creator>
      <dc:date>2017-01-23T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215410#M621786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(MonthStart(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FiscalDate&lt;/STRONG&gt;,-1)+25,'YYYY-MM') as Period&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215410#M621786</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-23T13:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215411#M621787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share few rows of data to show what you are looking to do? what was the issue when you used your own script? What was different when you used mine?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215411#M621787</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T13:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215412#M621788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if field "&lt;STRONG&gt;FiscalDate" &lt;/STRONG&gt;is in date format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215412#M621788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-23T13:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215413#M621789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is result according to my script: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="myscipt.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/150474_myscipt.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is according to yours: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="yours.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/150475_yours.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215413#M621789</guid>
      <dc:creator>ieuyar</dc:creator>
      <dc:date>2017-01-23T14:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215414#M621790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It did not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works this way: ,&lt;/P&gt;&lt;P&gt;&lt;IMG alt="yours2.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/150491_yours2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215414#M621790</guid>
      <dc:creator>ieuyar</dc:creator>
      <dc:date>2017-01-23T14:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215415#M621791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what exactly do you want to show in period? you wanted to subtract a month , the expression is subtracting a month!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215415#M621791</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-23T15:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths function with a negative integer</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215416#M621792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(AddMonths(FiscalDate, -1) + 25) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(FiscalDate, 'YYYY-MM') as Period;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2015, 12, 31) + IterNo()) as FiscalDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt;= 366;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-function-with-a-negative-integer/m-p/1215416#M621792</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T15:54:26Z</dc:date>
    </item>
  </channel>
</rss>

