<?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: Re: Re: QVD Distribution according to Period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605329#M683896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, you try this SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13928146620969515" jivemacro_uid="_13928146620969515" modifiedtitle="true"&gt;
&lt;P&gt;SQL Select * from YourTableName where Date &amp;gt;= '$(vDiaIni)' and Date &amp;lt;= '$(vDiaFim)'&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should change the date format, the format is, YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Tonial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 13:00:34 GMT</pubDate>
    <dc:creator>fernando_tonial</dc:creator>
    <dc:date>2014-02-19T13:00:34Z</dc:date>
    <item>
      <title>QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605322#M683885</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 face much more reloading time due to huge amount of data. We planned to implement Incremental Load. But it was not necessary for my client, because they are updating db three months once.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need to seperate the data from db as &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Table_201101-201310 -- History(I wont reload it once again)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table_ 201310-201402 -- (Reload this upto Feb end)&lt;/P&gt;&lt;P&gt;......vice versa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can use variable to proceed for the next period, but user have to change the period in Qlikview by changing the value in Input box.&lt;/P&gt;&lt;P&gt;But this kind of method was not agreed by my client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I planned to use notepad, where i could enter the period no. and use tat notepad in our script, i will provide that notepad to my client and ask them to change the period no. so tat we can get next period data automatically without changing our script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do using above plan? if yes, please help me how to do with the scripting!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kalyan.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:02:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605322#M683885</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2014-02-19T11:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605323#M683886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why does the user have to change the period? There are no user configurable reloads in QVS...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this not be done automatically, as in loading everything from a fixed or sliding start date up until MonthEnd(today()) as an increment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605323#M683886</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-02-19T11:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605324#M683887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13928113428448146" jivemacro_uid="_13928113428448146" modifiedtitle="true"&gt;
&lt;P&gt;LET vMesInicial = Date('01/01/2014');&lt;/P&gt;
&lt;P&gt;LET vMesFinal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(MonthEnd(Today())-2);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DATES:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(AddMonths('$(vMesInicial)',RowNo()-1),'YYYYMMDD')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS DiaIni,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthEnd(AddMonths('$(vMesInicial)',RowNo()-1)),'YYYYMMDD')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS DiaFim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(AddMonths('$(vMesInicial)',RowNo()-1),'YYYYMM')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS AnoMes&lt;/P&gt;
&lt;P&gt;AutoGenerate(Ceil((vMesFinal-vMesInicial)/30.5));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//EXIT Script;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR D=1 TO (NoOfRows('DATES'))&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vAnoMes = Peek('AnoMes',$(D)-1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vDiaIni = Peek('DiaIni',$(D)-1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vDiaFim = Peek('DiaFim',$(D)-1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE $(vAnoMes);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Table]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Select * from Table where MonthYear = '$(vAnoMes)';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store [Table] into DirExtraidos\Table_$(vAnoMes).QVD;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop table &lt;TABLE&gt;;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table DATES;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605324#M683887</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2014-02-19T11:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605325#M683888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally, I would always try to use as few distinct elements as possible - so I would suggest not using Notepad or any other external tool, but only the qvd files themselves.&lt;/P&gt;&lt;P&gt;- So every qvd should hold five months' worth of data, yes?&lt;/P&gt;&lt;P&gt;- I assume you already have created that archive_qvd that goes up to 201310, yes?&lt;/P&gt;&lt;P&gt;=&amp;gt; Then my suggestion would be this:&lt;/P&gt;&lt;P&gt;- Find out how to load the file_names of all the files in the directory where those qvd files should be (unfortunately I don't know how to do that, but (not ideally, but alternatively) you might use your .txt approach there, as a qvs file to be populated by the customer and as a last resort you can always hard-code them in an Ínline table)&lt;/P&gt;&lt;P&gt;- Get the largest second ("to") year-month figure from all of those files&lt;/P&gt;&lt;P&gt;- Compare that to the current year-month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - If the current year-month is still within the scope of that file, you can use it&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; the new data should be appended to that qvd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - If the current year-month is not in the scope of that file anymore, you have to create a new one&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; First, LOAD RESIDENT (from some other table, doesn't matter) an empty table, just to have the fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; then append the new data to that&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605325#M683888</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-02-19T11:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605326#M683889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will get error for where condition, because Monthyear field is not in table.&lt;BR /&gt;So I would get Field Not Found Error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kalyan.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605326#M683889</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2014-02-19T11:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605327#M683891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have chage this part of the script for your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13928113797008103 jive_macro_code" jivemacro_uid="_13928113797008103" modifiedtitle="true"&gt;
&lt;P&gt;[Table]: &lt;/P&gt;
&lt;P&gt;SQL Select * from Table where MonthYear = '$(vAnoMes)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Store Table into DirExtraidos\Table_$(vAnoMes).QVD;&lt;/P&gt;
&lt;P&gt;Drop Table;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_13928113796928458 jive_text_macro jive_macro_code" jivemacro_uid="_13928113796928458"&gt;
&lt;P&gt;[Your Table Name]: &lt;/P&gt;
&lt;P&gt;SQL Select * from YourTableName where YourFildWithPeriod = '$(vAnoMes)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Store [Your Table Name] indo [Your Table Name]_$(vAnoMes).qvd;&lt;/P&gt;
&lt;P&gt;Drop [Your Table Name];&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Tonial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605327#M683891</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2014-02-19T12:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605328#M683894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I have changed tat part already, i don't have fields such as period, i do have only date field, using tat date field only I will extract year, month, period, etc.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605328#M683894</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2014-02-19T12:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605329#M683896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, you try this SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13928146620969515" jivemacro_uid="_13928146620969515" modifiedtitle="true"&gt;
&lt;P&gt;SQL Select * from YourTableName where Date &amp;gt;= '$(vDiaIni)' and Date &amp;lt;= '$(vDiaFim)'&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should change the date format, the format is, YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Tonial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 13:00:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605329#M683896</guid>
      <dc:creator>fernando_tonial</dc:creator>
      <dc:date>2014-02-19T13:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: QVD Distribution according to Period</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605330#M683898</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 had tried my level best, just by filtering date in the table.&lt;/P&gt;&lt;P&gt;I had created From and To notepad, in From, start date, in To end date,&lt;/P&gt;&lt;P&gt;Asked user to modify the date once they are updating db three months once.&lt;/P&gt;&lt;P&gt;I load tat notepad in QV, and set it as variable,&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;vFrom='$(Include.....);';&lt;/P&gt;&lt;P&gt;vTo='$(Include);';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in where condtion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Date&amp;gt;=$(vFrom) and Date&amp;lt;=$(vTo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and store it as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_$(vFrom)-$(vTo).qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I take all the qvd by using * sign after the table name.&lt;/P&gt;&lt;P&gt;EX;&lt;/P&gt;&lt;P&gt;Load * From Table_*.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so this will read all the data from the beginning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to everyone who had replied to my discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kalyan.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 07:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Distribution-according-to-Period/m-p/605330#M683898</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2014-02-20T07:36:10Z</dc:date>
    </item>
  </channel>
</rss>

