<?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: Closed two month period flag in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941379#M645977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about what you want, it's based on current date?, so if today is 16 december you want to flag all october and november dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case this script seems work:&lt;/P&gt;&lt;P&gt;Let vNumMonthYesterday = Num(Month(AddMonths(Today()-1, -1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match($(vNumMonthYesterday)-Num(Month(Date)), 0, 1), 1, 0) as Flag&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[.\2 closed Months.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Лист1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it's supposed that only flags Jan when Jan is last closed month but I didn't tested that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2015 14:09:51 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-12-16T14:09:51Z</dc:date>
    <item>
      <title>Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941369#M645962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;in load script i made flag for last closed month name:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;month(Addmonths(Today()-1, -1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now i need to make flag (0/1), which will filter data for last closed 2 month period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Jan',&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;here must be Jan (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Feb'&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Jan-Feb (for all years)&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Mar',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Feb-Mar (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Apr',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Mar-Apr (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='May',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Apr-May&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Jun',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be May-Jun&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Jul',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Jun-Jul&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Aug',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Jul-Aug&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Sep',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Aug-Sep&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Oct',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Sep-Oct&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Nov',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Oct-Nov&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Dec',&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333330154419px;"&gt;here must be Nov-Dec&amp;nbsp; (for all years)&lt;/STRONG&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;Please, help!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 12:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941369#M645962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T12:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941370#M645964</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If(Month(AddMonths(Today(),-2)) = 'Jan') for 2 months before and -1 for one month before&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 12:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941370#M645964</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-12-16T12:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941371#M645967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this post can help you: &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the example with the x-month rolling , I think you're asking about 2-months rolling, logic is the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 12:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941371#M645967</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-16T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941372#M645970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;but i need following flag, for exaple, if last closed month is Jan&lt;/P&gt;&lt;P&gt;if(month(Addmonths(Today()-1, -1))='Jan', &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(condition to get 'Jan' for all years, 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941372#M645970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T13:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941373#M645971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide some sample data along with expected output in excel file..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941373#M645971</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-12-16T13:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941374#M645972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In attachment.. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941374#M645972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T13:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941375#M645973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want Jan 2014 and 2015 both?&lt;/P&gt;&lt;P&gt;Are you interested two month back or one month back?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941375#M645973</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-12-16T13:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941376#M645974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Yes, for two years. But this is test data, in my real model there're 2015, 2014, 2013 ... Jan for all years&lt;/P&gt;&lt;P&gt;2. One month back only for Jan (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(month(Addmonths(Today()-1, -1))='Jan'&lt;/SPAN&gt;). For all others - two month back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941376#M645974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T13:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941377#M645975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the below link , this will help to create the flags&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9250"&gt;Rolling N months&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941377#M645975</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-12-16T13:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941378#M645976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14502731319911932" jivemacro_uid="_14502731319911932" modifiedtitle="true"&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Month(Date) as Month,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If(Month(Date) = Month(AddMonths(Today(),-2)),1,0) as Temp_Flag&lt;/P&gt;
&lt;P&gt;Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date, Sales&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.01.2015, 5454&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.01.2015, 54&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.01.2015, 234&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.01.2014, 634&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.01.2014, 23&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.01.2014, 64&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.02.2015, 5454&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.02.2015, 54&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.02.2015, 234&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.02.2014, 634&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.02.2014, 23&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.02.2014, 64&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.03.2015, 100&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.03.2015, 110&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.02.2015, 50&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.03.2014, 40&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.03.2014, 60&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.03.2014, 65&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.04.2015, 44&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.04.2015, 43&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.04.2015, 20&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.04.2014, 10&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 02.04.2014, 5&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 01.04.2014, 25&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Final:&lt;/P&gt;
&lt;P&gt;Load Date,Month, Sales, If(RowNo()=1,Temp_Flag, If(Temp_Flag=1 and Previous(Temp_Flag)=0, Temp_Flag, Peek('Flag'))) as Flag Resident Data Order By Month Desc, Date Desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Data;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Now you can use&lt;/P&gt;
&lt;P&gt;=SUM({&amp;lt;Flag = {1}&amp;gt;}Sales)&lt;/P&gt;


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 13:38:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941378#M645976</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-12-16T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941379#M645977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about what you want, it's based on current date?, so if today is 16 december you want to flag all october and november dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case this script seems work:&lt;/P&gt;&lt;P&gt;Let vNumMonthYesterday = Num(Month(AddMonths(Today()-1, -1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match($(vNumMonthYesterday)-Num(Month(Date)), 0, 1), 1, 0) as Flag&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[.\2 closed Months.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Лист1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it's supposed that only flags Jan when Jan is last closed month but I didn't tested that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 14:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941379#M645977</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-16T14:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941380#M645978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your solution flag has only one value: 0...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 14:29:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941380#M645978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T14:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941381#M645979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If shows only 0 is because you don't have data for october or november, or because the date format is different than from the Excel, if you add data to november and october you can see the '1'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 14:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941381#M645979</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-16T14:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941382#M645980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will it works for others condition? For example,&amp;nbsp; if last closed month is Jan, it must filter data for Jan, if last closed month in Feb: Jan-Feb?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Jan',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;here must be Jan (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Feb'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Jan-Feb (for all years)&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Mar',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Feb-Mar (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Apr',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Mar-Apr (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='May',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Apr-May&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Jun',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be May-Jun&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Jul',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Jun-Jul&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Aug',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Jul-Aug&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Sep',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Aug-Sep&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Oct',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Sep-Oct&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Nov',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Oct-Nov&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(month(Addmonths(Today()-1, -1))='Dec',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;here must be Nov-Dec&amp;nbsp; (for all years)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))))))))))))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 14:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941382#M645980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-16T14:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941383#M645981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should work but I don't have time now to test, change "Today()" (in the variable) to the date you want to test to confirm it's working in all cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 15:45:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941383#M645981</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-16T15:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941384#M645982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!! it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear, tell me please, is there in your expression possibility to make change for closed month Jan: get Jan'Current year-Dec'Previous Year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 06:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941384#M645982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-17T06:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941385#M645983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add a condition to the 'If' to check if it's january and date is december:&lt;/P&gt;&lt;P&gt;Let vNumMonthYesterday = Num(Month(AddMonths(Today()-1, -1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If($(vNumMonthYesterday)=1 and Num(Month(Date))=12, 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match($(vNumMonthYesterday)-Num(Month(Date)), 0, 1), 1, 0)) as Flag&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[.\2 closed Months.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Лист1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 07:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941385#M645983</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-17T07:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941386#M645984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;i've try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it gives me also jan for 2014. But i need jan only forcurrent year and dec for previous.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 08:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941386#M645984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-17T08:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941387#M645985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can modify the 'If' to fit your requirements checking conditions for Year(Today())=Year(Date) or Year(Today())=Year(Date)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 08:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941387#M645985</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-17T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Closed two month period flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941388#M645987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please, can you write example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 09:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closed-two-month-period-flag-in-load-script/m-p/941388#M645987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-17T09:06:25Z</dc:date>
    </item>
  </channel>
</rss>

