<?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: Current Period and Previous Period in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435940#M798163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your response!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2017 09:37:31 GMT</pubDate>
    <dc:creator>gayatri7</dc:creator>
    <dc:date>2017-12-06T09:37:31Z</dc:date>
    <item>
      <title>Current Period and Previous Period in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435937#M798160</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 have a period column which contains value like 201708,201709,201710 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to extract the value from another file based on the current period only.&lt;/P&gt;&lt;P&gt;Eg. In file A I have Period columns contain 201708,201709,201710 etc. where as in file B I have entire history details and need to extract only the data for Current month. and for some related to previous month&lt;/P&gt;&lt;P&gt;I have created a variable as shown below&lt;/P&gt;&lt;P&gt;vCurrentYear: Left([PERIODO],4)&lt;/P&gt;&lt;P&gt;vCurrentMonth: Right([PERIODO],2)&lt;/P&gt;&lt;P&gt;vPreviousYear: Left([PERIODO]-1),4)&lt;/P&gt;&lt;P&gt;vPreviousMonth: Right(([PERIODO]-1),2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Previous month and year variable is not working at the script level where as it is working fine in text object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Can anyone confirm me whether it is the right approach or not?&lt;/P&gt;&lt;P&gt;and will variable values in the script will change automatically when period value changes .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435937#M798160</guid>
      <dc:creator>gayatri7</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Current Period and Previous Period in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435938#M798161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try these:&lt;/P&gt;&lt;P&gt;vPeriod = Date#(PERIODO,'YYYYMM')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vCurrentYear = Year($(vPeriod))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vCurrentMonth: Month&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;($(vPeriod))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vPreviousYear: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year($(vPeriod))-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vPreviousMonth: Month(MonthStart($(vPeriod),-1))&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;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;and will variable values in the script will change automatically when period value changes&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. if you calculate the variables in the script then they will be change during reload when the source data contains new data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435938#M798161</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-12-06T09:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Current Period and Previous Period in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435939#M798162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you going call variables into Field ?? Where and what is not working for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435939#M798162</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T09:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Current Period and Previous Period in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435940#M798163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your response!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Period-and-Previous-Period-in-the-script/m-p/1435940#M798163</guid>
      <dc:creator>gayatri7</dc:creator>
      <dc:date>2017-12-06T09:37:31Z</dc:date>
    </item>
  </channel>
</rss>

