<?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: Reload Data by Using For Loop : Qliksense in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Reload-Data-by-Using-For-Loop-Qliksense/m-p/1692927#M5087</link>
    <description>&lt;P&gt;May be, instead of passing the, variable value in variable statement, pass it in the Where condition of the SQL query.&lt;/P&gt;&lt;P&gt;Put the LIB connection string before the Varaible creation, it avoids multiple time of connection to SAP.&lt;/P&gt;&lt;P&gt;In the For loop, also try with Fieldvalue(month_value,'$(i)') at peek function.&lt;/P&gt;&lt;P&gt;Try this : For i = 1 to 4.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2020 07:54:45 GMT</pubDate>
    <dc:creator>BalaBhaskar_Qlik</dc:creator>
    <dc:date>2020-04-13T07:54:45Z</dc:date>
    <item>
      <title>Reload Data by Using For Loop : Qliksense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Reload-Data-by-Using-For-Loop-Qliksense/m-p/1692237#M5084</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am extracting data from source system.&lt;/P&gt;&lt;P&gt;Requirement&amp;nbsp; :&lt;/P&gt;&lt;P&gt;1. I want to extract data for last 3 months&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Load fails while using dynamic variable in extraction&amp;nbsp;&lt;/P&gt;&lt;P&gt;Summary :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note : Date is maintained in the format of YYYYMM in source system&lt;/P&gt;&lt;P&gt;Due to huge size of data i cant execute all 3 months data in one time. Hence i have created FOR Loop to extract the data from source system.&lt;/P&gt;&lt;P&gt;I am extracting data based on Calendar month (YYYYMM)) format.&lt;/P&gt;&lt;P&gt;When i pass variable in where clause its ending up with error.&lt;/P&gt;&lt;P&gt;Could you please let me know what could be error here?&lt;/P&gt;&lt;P&gt;//Z0CALMONTH_CCMI_VAR001 = 202002&lt;/P&gt;&lt;P&gt;let v_current_month = Year(today()) &amp;amp; num(Month(Today()),'00');&lt;BR /&gt;let v_current_month_1 = Year(today()) &amp;amp; Num(Month(AddMonths(Today(),-1)),'00');&lt;BR /&gt;let v_current_month_2 = Year(today()) &amp;amp; Num(Month(AddMonths(Today(),-2)),'00');&lt;/P&gt;&lt;P&gt;Period_table:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;month_value,&lt;BR /&gt;'$(v_current_month)'&lt;BR /&gt;'$(v_current_month_1)'&lt;BR /&gt;'$(v_current_month_2)'&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;For i=0 to 3;&lt;BR /&gt;let months=Peek(month_value,$(i),'Period_table');&lt;BR /&gt;LIB CONNECT TO 'SAPBWBEX_Prod';&lt;/P&gt;&lt;P&gt;[ZZ00SDSV01_SDSS_001]:&lt;BR /&gt;LOAD&lt;BR /&gt;[0COMP_CODE] as [Company code],&lt;BR /&gt;[0CALMONTH] as [Calendar Year/Month],&lt;BR /&gt;[COC1GKDA48088F3VR5VJX4RV6] as [No. of Sales Orders],&lt;BR /&gt;[CURRENCY001] as [CURRENCY001 No. of Sales Orders],&lt;BR /&gt;[UNIT001] as [UNIT001 No. of Sales Orders],&lt;BR /&gt;[0COMP_CODE__TEXT] as [Company code TEXT],&lt;BR /&gt;[0CALMONTH__TEXT] as [Calendar Year/Month TEXT];&lt;/P&gt;&lt;P&gt;SELECT [ZZ00SDSV01_SDSS_001]&lt;BR /&gt;DIMENSIONS (&lt;BR /&gt;[0COMP_CODE], //Company code&lt;BR /&gt;[0CALMONTH], //Calendar Year/Month&lt;BR /&gt;)&lt;BR /&gt;MEASURES (&lt;BR /&gt;[COC1GKDA48088F3VR5VJX4RV6], //No. of Sales Orders&lt;BR /&gt;)&lt;BR /&gt;UNITS (&lt;BR /&gt;[CURRENCY001.COC1GKDA48088F3VR5VJX4RV6], //CURRENCY001 No. of Sales Orders&lt;BR /&gt;[UNIT001.COC1GKDA48088F3VR5VJX4RV6], //UNIT001 No. of Sales Orders&lt;BR /&gt;)&lt;BR /&gt;VARIABLES (&lt;BR /&gt;&lt;BR /&gt;[NAME=Z0CALMONTH_CCMI_VAR001, SIGN=I, OPTION=EQ, LOW= '$(months)'], //Calendar Year/Month - (MM.YYYY)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;FROM [Z00SDSV01];&lt;/P&gt;&lt;P&gt;next i;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;STORE * FROM [ZZ00SDSV01_SDSS_001] INTO [$(vG.ExtractPath)/SAPBWBEX/ZZ00SDSV01_SDSS_001.qvd];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 13:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Reload-Data-by-Using-For-Loop-Qliksense/m-p/1692237#M5084</guid>
      <dc:creator>poojapalni1</dc:creator>
      <dc:date>2021-12-23T13:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reload Data by Using For Loop : Qliksense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Reload-Data-by-Using-For-Loop-Qliksense/m-p/1692927#M5087</link>
      <description>&lt;P&gt;May be, instead of passing the, variable value in variable statement, pass it in the Where condition of the SQL query.&lt;/P&gt;&lt;P&gt;Put the LIB connection string before the Varaible creation, it avoids multiple time of connection to SAP.&lt;/P&gt;&lt;P&gt;In the For loop, also try with Fieldvalue(month_value,'$(i)') at peek function.&lt;/P&gt;&lt;P&gt;Try this : For i = 1 to 4.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 07:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Reload-Data-by-Using-For-Loop-Qliksense/m-p/1692927#M5087</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2020-04-13T07:54:45Z</dc:date>
    </item>
  </channel>
</rss>

