<?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 Generate QVD of the subsequent month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Generate-QVD-of-the-subsequent-month/m-p/1549904#M39622</link>
    <description>&lt;P&gt;I created a routine to capture the information of some documents and these are divided by competence (date of payment). It turns out that the created routine reads the files until the current month (current), that is, if we are in February, it does not read the March file.&amp;nbsp;Now I need to read at least a month ahead, but I can not do that, because in February I'm already getting the files that refer to March.&lt;/P&gt;&lt;P&gt;Example: Currently because we are in February, the script loads the files that exist until february.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 750px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6878iCCBC12F3C82343A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need the script to also load the files until the later month, that is, until March (2019_03)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 225px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6879i33B4E5C43DDB46E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've attached the QVF, the files I'm currently using, and the worksheet to configure QVD loading.&lt;/P&gt;&lt;P&gt;Thanks in advance for your attention and help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:28:31 GMT</pubDate>
    <dc:creator>edugallowk</dc:creator>
    <dc:date>2024-11-16T06:28:31Z</dc:date>
    <item>
      <title>Generate QVD of the subsequent month</title>
      <link>https://community.qlik.com/t5/App-Development/Generate-QVD-of-the-subsequent-month/m-p/1549904#M39622</link>
      <description>&lt;P&gt;I created a routine to capture the information of some documents and these are divided by competence (date of payment). It turns out that the created routine reads the files until the current month (current), that is, if we are in February, it does not read the March file.&amp;nbsp;Now I need to read at least a month ahead, but I can not do that, because in February I'm already getting the files that refer to March.&lt;/P&gt;&lt;P&gt;Example: Currently because we are in February, the script loads the files that exist until february.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 750px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6878iCCBC12F3C82343A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need the script to also load the files until the later month, that is, until March (2019_03)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 225px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6879i33B4E5C43DDB46E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've attached the QVF, the files I'm currently using, and the worksheet to configure QVD loading.&lt;/P&gt;&lt;P&gt;Thanks in advance for your attention and help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generate-QVD-of-the-subsequent-month/m-p/1549904#M39622</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2024-11-16T06:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Generate QVD of the subsequent month</title>
      <link>https://community.qlik.com/t5/App-Development/Generate-QVD-of-the-subsequent-month/m-p/1549907#M39624</link>
      <description>&lt;P&gt;I imagine that the adjustment should done in this piece of code so that it is possible to read all the files regardless of the date. I need to read at least until the month after the current one, but if I read every future month, there would be no problem.&lt;/P&gt;&lt;PRE&gt;//-------------------------Define Variavel com os valores de Periodos------------------------------------

Periodos: LOAD Periodos, QtdeMesesAsterisco, QtdeMesesFolga FROM [$(ARQParametro)] (ooxml, embedded labels, table is Periodos);
LET Periodos=FieldValue('Periodos',1);
DROP Table Periodos;

IF '$(Periodos)'='*' THEN
	//-------------------------Define o número de meses que serão carregados ----------------------
	QtdeMesesAsterisco: LOAD QtdeMesesAsterisco FROM [$(ARQParametro)] (ooxml, embedded labels, table is Periodos);
	LET QtdeMesesAsterisco=FieldValue('QtdeMesesAsterisco',1);
	DROP Table QtdeMesesAsterisco;
	
	QtdeMesesFolga: LOAD QtdeMesesFolga FROM [$(ARQParametro)] (ooxml, embedded labels, table is Periodos);
	LET QtdeMesesFolga=FieldValue('QtdeMesesFolga',1);
	DROP Table QtdeMesesFolga;

	IF '$(QtdeMesesFolga)'&amp;lt;1 or '$(QtdeMesesFolga)'=Null() then
		LET QtdeMesesFolga = 0;
	ENDIF	

	LET DataFim = MonthStart(AddMonths(Today(),-$(QtdeMesesFolga)));
	LET DataInicio = MonthStart(AddMonths('$(DataFim)',-$(QtdeMesesAsterisco)+1));
	LET Periodos = '';
	
	DO
		LET Periodos = '$(Periodos)' &amp;amp; Num(Month('$(DataInicio)'),'00') &amp;amp; Year('$(DataInicio)');
		IF '$(DataInicio)'&amp;lt;'$(DataFim)' then 
			LET Periodos = '$(Periodos)' &amp;amp; ',';
		ENDIF
		LET DataInicio = AddMonths('$(DataInicio)',1);
		
		IF '$(QtdeMesesAsterisco)'&amp;lt;1 or '$(QtdeMesesAsterisco)'=Null() then
			LET DataInicio = AddMonths('$(DataFim)',1);
			LET Periodos = '';
		ENDIF
	LOOP while '$(DataInicio)'&amp;lt;='$(DataFim)';
ENDIF
LET PeriodosFatos = '$(Periodos)';&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2019 14:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generate-QVD-of-the-subsequent-month/m-p/1549907#M39624</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2019-02-27T14:09:55Z</dc:date>
    </item>
  </channel>
</rss>

