<?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: How to remove previous month stock amount ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696441#M540506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So basically you are looking for below three SETs to be merged together in single script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Remove previous month data&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;month-={$(=Num(Month(AddMonths(Today(),-1))))}&amp;gt;} [TOTAL_AMT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;2) Calculate YTD base on year and month selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Variable1 =&amp;gt;&amp;nbsp; vSelectedYear=Year(Max(Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Variable2 =&amp;gt; vSelectedMonth=Month(max(Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Year={$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vSelectedYear&lt;/SPAN&gt;)},Month={'&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vSelectedMonth&lt;/SPAN&gt;)'} &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TOTAL_AMT&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;3) Remove last three months data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;month-={$(&amp;gt;=Num(Month(AddMonths(Today(),-3)))&amp;lt;=Num(Month(AddMonths(Today(),-1))))}&amp;gt;} [TOTAL_AMT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Aug 2014 10:10:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-01T10:10:18Z</dc:date>
    <item>
      <title>How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696433#M540498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to remove my Previous month stock amount ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Table which is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to Previous month data is not consider as D/O not release. So i need to remove Previous month amount.70.74 &amp;amp; 94.61.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696433#M540498</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-01T07:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696434#M540499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$ &amp;lt;mymonth={'$(&amp;gt;=(month(totay()))'}&amp;gt; }Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696434#M540499</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-08-01T07:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696435#M540500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enclosed my QV doc. which explan more in detail .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696435#M540500</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-01T07:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696436#M540501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ale&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try below code it return nul val :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$ &amp;lt;Month={'$(&amp;gt;=(Month(Today()))-1'}&amp;gt; }[TOTAL_AMT])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any alternative ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696436#M540501</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-01T07:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696437#M540502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;month-={$(=Num(Month(AddMonths(Today(),-1))))}&amp;gt;} [TOTAL_AMT])/1000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696437#M540502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-01T07:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696438#M540503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satyadev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your script work fine. But when i use it in my actual QV doc , which is not working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My actual QV doc is reading QVD file from the file i have attach here. So i think it is due to i cannot use AddMonths , it is possible just using SET command ? like Mr Ales approach. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 08:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696438#M540503</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-01T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696439#M540504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AddMonths is QlikView function, you can use it in your script. Basically I am subtracting one month from current month by using AddMonths function and comparing and removing it from the field called "month". &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Check if you have "month" column in your application. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;You may not see past month data by using Ales script and if you are looking for same thing you can use Ales script. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Remember, you should not use Month(Today())-1 as it will give you "0" when you are in Jan month and that's the reason I am using AddMonths(Today(), -1).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 08:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696439#M540504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-01T08:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696440#M540505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you vey much your expression now working fine. ( This issue i encounter few time ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way thank you very much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is possible to move one more step further , which is assist me modify the code , by using the SET analysis , so that user can click on year 2013 month Dec , so they are able to view the Amount till 2013 Dec. As now i can only remove the previous month amount. As my need is also remove 3 month ago. Hope you can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 09:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696440#M540505</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-01T09:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696441#M540506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So basically you are looking for below three SETs to be merged together in single script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Remove previous month data&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;month-={$(=Num(Month(AddMonths(Today(),-1))))}&amp;gt;} [TOTAL_AMT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;2) Calculate YTD base on year and month selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Variable1 =&amp;gt;&amp;nbsp; vSelectedYear=Year(Max(Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Variable2 =&amp;gt; vSelectedMonth=Month(max(Date))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Year={$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vSelectedYear&lt;/SPAN&gt;)},Month={'&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vSelectedMonth&lt;/SPAN&gt;)'} &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TOTAL_AMT&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;3) Remove last three months data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;month-={$(&amp;gt;=Num(Month(AddMonths(Today(),-3)))&amp;lt;=Num(Month(AddMonths(Today(),-1))))}&amp;gt;} [TOTAL_AMT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 10:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696441#M540506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-01T10:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove previous month stock amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696442#M540507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your expression , i have tested it is not i need , in order to make thing simple , i start new post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 03:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-previous-month-stock-amount/m-p/696442#M540507</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2014-08-02T03:57:27Z</dc:date>
    </item>
  </channel>
</rss>

