<?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: Storing QVD's with filebase name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674578#M244955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nirmal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 'Data' has all the values and different Region_Code values, to create a qvd for each region_code you can do a bucle that extracts the data from Data table and then create the qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;For i=1 to FieldValueCount('Region_Code')&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vRegionCode = FieldValue('Region_Code', $(i));&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data_tmp:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NoConcatenate LOAD * From Data Where Region_Code = '$(vRegionCode)';&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store Data_tmp into $(vRegionCode)_Data.qvd;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table Data_tmp;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Next&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I didn't tested last code, maybe there are typos and some bug but that's the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Sep 2014 07:43:23 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2014-09-11T07:43:23Z</dc:date>
    <item>
      <title>Storing QVD's with filebase name</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674577#M244954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Hope all are doing good. I have a excel files named US_DataUSLastmonth.Xls &amp;amp; US_DataUSMTD.xls, IND_DataINDlastmonth.xls &amp;amp; IND_DataINDMTD.xls, UK_DataUKlastmonth.xls &amp;amp; UK_DataUKMTD.xls etc., here i am doing conditional load. Because for monthstart i have to load last monthdata and MTD other wise load MTD load only to concatenate with old QVD. Please find below my Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Today()=monthstart(today()) then&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;subfield(filebasename(),'_',1) as Region_Code&lt;/P&gt;&lt;P&gt;from *_Data*lastmonth.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;subfield(filebasename(),'_',1) as Region_Code&lt;/P&gt;&lt;P&gt;from *_Data*MTD.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;subfield(filebasename(),'_',1) as Region_Code&lt;/P&gt;&lt;P&gt;from *_Data*MTD.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;subfield(filebasename(),'_',1) as Region_Code&lt;/P&gt;&lt;P&gt;from Extraction.qvd&lt;/P&gt;&lt;P&gt;where not exists(Primarykey);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let VRegion_Code=subfield(filebasename(),'_',1);&lt;/P&gt;&lt;P&gt;store Data into $(VRegion_Code)_Data.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here I want to load region wise QVD (i.e., US_Data.qvd,UK_Data.qvd) but my script didnt get the proper result. Can anyone help me. Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 07:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674577#M244954</guid>
      <dc:creator />
      <dc:date>2014-09-11T07:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Storing QVD's with filebase name</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674578#M244955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nirmal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 'Data' has all the values and different Region_Code values, to create a qvd for each region_code you can do a bucle that extracts the data from Data table and then create the qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;For i=1 to FieldValueCount('Region_Code')&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vRegionCode = FieldValue('Region_Code', $(i));&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data_tmp:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NoConcatenate LOAD * From Data Where Region_Code = '$(vRegionCode)';&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store Data_tmp into $(vRegionCode)_Data.qvd;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table Data_tmp;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Next&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I didn't tested last code, maybe there are typos and some bug but that's the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 07:43:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674578#M244955</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-09-11T07:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Storing QVD's with filebase name</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674579#M244956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank you for your valuable response. I already tried that above script. But it is working in Normal load not working in Conditional load.&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, 11 Sep 2014 07:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674579#M244956</guid>
      <dc:creator />
      <dc:date>2014-09-11T07:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Storing QVD's with filebase name</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674580#M244957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand what you mean whith 'conditional load', you have to replace your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Let VRegion_Code=subfield(filebasename(),'_',1);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;store Data into $(VRegion_Code)_Data.qvd;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;By the code I provided (or an adaptation of that code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just guessing... maybe code fails beacuse in the 'else' instance tha table is unnamed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 08:01:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-QVD-s-with-filebase-name/m-p/674580#M244957</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-09-11T08:01:59Z</dc:date>
    </item>
  </channel>
</rss>

