<?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: Loading the two fields as same field from csv. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479826#M179310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You only have to assure that all your filenames ends with&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'times new roman', 'new york', times, serif; font-size: 16px;"&gt;EMPLOYEE_CMO_YYYY_MM, so right(filename,7) will get a string like 2013_09, 2013_10 and so on...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 17:45:39 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2013-09-25T17:45:39Z</dc:date>
    <item>
      <title>Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479821#M179305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;I have following requirement. I got stuck in one point. Can someone help me out for that?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;1. All the csv in the folder starts with PRISM(EMPLOYEE_CMO_2012_09,EMPLOYEE_Markets_2013_02,EMPLOYEE_City_2013_09...).For your information all the file ends with YYYY_MM.&lt;BR /&gt;2. As discussed there is a change in the field name from 2013_08. So whatever the file which has been received from 2013_08 will have different new name. All the files which was removed before 2013_08 will have old field name.&lt;BR /&gt;3. So while loading data from the new file (&amp;gt; 2013_07) it should load with the new fields and while loading from the data from the file (&amp;lt;= 2013_07) it should load with the old field name only.&lt;BR /&gt;----------------------------&lt;BR /&gt;This is the code which I have written to scan the files from a folder. But got stuck while loading csv files based the condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;For each vFile in FileList('C:\QlikView\Source\EMPLOYEE_*.csv') &lt;BR /&gt;Files: // reading csv files with yearmonth in filename&lt;BR /&gt;LOAD *,&lt;BR /&gt;right(subfield(FileName, '.' ,1),7) as YearMonth&lt;BR /&gt;LOAD '$(vFile)' as FilePath,&lt;BR /&gt;subfield('$(vFile)','\',-1) as FileName&lt;BR /&gt;autogenerate 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;BR /&gt;&lt;SPAN&gt;if(File name contains &amp;gt;= 2013_08 it should load with new fields) // What should be the condition here???&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;SPAN&gt;TableName:&lt;BR /&gt;EmpName as CustName,&lt;BR /&gt;EmpId as CustId,&lt;BR /&gt;field1,&lt;BR /&gt;field2&lt;BR /&gt;from&lt;BR /&gt;C:\QlikView\Source\EMPLOYEE_*.csv //How should I pass the filename here??? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-size: 16px; font-family: times new roman, new york, times, serif; font-style: normal;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;else&lt;BR /&gt;&lt;BR /&gt;CustName as CustName,&lt;BR /&gt;CustId as CustId,&lt;BR /&gt;field1,&lt;BR /&gt;field2&lt;BR /&gt;from&lt;BR /&gt;C:\QlikView\Source\EMPLOYEE_*.csv //How should I pass the filename here???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;NEXT vFile&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479821#M179305</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-09-25T17:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479822#M179306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: 'courier new', courier;"&gt;For each vFile in FileList('C:\QlikView\Source\EMPLOYEE_*.csv') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Files: // reading csv files with yearmonth in filename&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&amp;nbsp; '$(vFile)' as FilePath,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&amp;nbsp; subfield('$(vFile)','\',-1) as FileName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;autogenerate 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;LET vFileName = right(Peek('FileName'),7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;drop Table Files;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;if '$(vFileName)' follows '2013_07' then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;TableName:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;LOAD&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;EmpName as CustName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;EmpId as CustId,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;field1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12pt;"&gt;field2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: 'courier new', courier;"&gt;from $(vFile);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: 'courier new', courier;"&gt;else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; another load here...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 16px; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479822#M179306</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-25T17:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479823#M179307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. As I dont have the system with me now. I will try this once I get the system and update you on that. But I am not sure how the below IF statement works? Can you please elaborate this to me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;if '$(vFileName)' follows '2013_07' then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479823#M179307</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-09-25T17:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479824#M179308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Follows is almost like '&amp;gt;'&amp;nbsp; to strings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So 2013_01 follows 2012_12&lt;/P&gt;&lt;P&gt;2013_09 follows 2013_01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could convert the string to a number before the comparision, but I chose to write less lines of code &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479824#M179308</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-25T17:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479825#M179309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the below If statement will work as it is? I have never used this before &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. If it works as it is then it is great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;if '$(vFileName)' follows '2013_07' then&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:43:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479825#M179309</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-09-25T17:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479826#M179310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You only have to assure that all your filenames ends with&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'times new roman', 'new york', times, serif; font-size: 16px;"&gt;EMPLOYEE_CMO_YYYY_MM, so right(filename,7) will get a string like 2013_09, 2013_10 and so on...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:45:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479826#M179310</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-25T17:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479827#M179311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes surely the file name will end with YYYY_MM. I will try this and will keep you updated on that. Thank you so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 17:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479827#M179311</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-09-25T17:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479828#M179312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;What will be the change in below IF statement if I want to load latest 2 months of data. Please advice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;//if '$(vFileName)' follows '2013_07' then&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 12:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479828#M179312</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-10-25T12:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479829#M179313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your scenario is very well handled by the use of If condition. This is the best way provided by Qlikview that we can use If condition very robustly!!!&lt;/P&gt;&lt;P&gt;I have added few lines in your script and provided comments so that you can put your appropriate file name in the right place. Just checkthis method if it works for you and let me know.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;P.S. : If&lt;/STRONG&gt; your Old file consists&amp;nbsp; of different set of columns which you wanted to include in the new file format then that is also possible. Just try it and if you need any more information then let me know. &lt;/P&gt;&lt;P&gt;Thanks!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Yojas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="text-decoration: underline;"&gt;Script : &lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;For each vFile in FileList('C:\QlikView\Source\EMPLOYEE_*.csv') &lt;BR /&gt;&lt;BR /&gt;Files: // reading csv files with yearmonth in filename&lt;BR /&gt;&lt;BR /&gt;LOAD *,&lt;BR /&gt;&lt;BR /&gt;right(subfield(FileName, '.' ,1),7) as YearMonth&lt;BR /&gt;&lt;BR /&gt;LOAD '$(vFile)' as FilePath,&lt;BR /&gt;&lt;BR /&gt;subfield('$(vFile)','\',-1) as FileName&lt;BR /&gt;&lt;BR /&gt;autogenerate 1;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black;"&gt;&lt;BR /&gt;//if(File name contains &amp;gt;= 2013_08 it should load with new fields) // What&lt;BR /&gt;should be the //condition here???&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;***&amp;nbsp;&amp;nbsp; Newly Added Line *** If(right(FileName,7)&amp;gt;=2013_08)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;***&amp;nbsp;&amp;nbsp; Newly Added Line *** Then&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;TableName:&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;Load *&lt;BR /&gt;from&lt;BR /&gt;&lt;BR /&gt;***&amp;nbsp;&amp;nbsp; Newly Added Line *** C:\QlikView\Source\(PUT_OLD_FILEFORMAT_HERA)_*.csv&lt;BR /&gt;//How should I pass the filename here??? &lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;***&amp;nbsp;&amp;nbsp; Newly Added Line&lt;BR /&gt;*** &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;Else&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black;"&gt;If(right(FileName,7)&amp;gt;=2013_08)&amp;nbsp; &lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;Then&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: black;"&gt;LOAD *&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;&lt;BR /&gt;from&lt;BR /&gt;&lt;SPAN lang="EN" style="color: black;"&gt;***&amp;nbsp;&amp;nbsp; Newly Added Line *** &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;C:\QlikView\Source\(PUT_NEW_FILEFORMAT_HERE)_*.csv //How&lt;BR /&gt;should I pass the filename here???&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background: white;"&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;end if&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #3d3d3d; font-family: 'Helvetica','sans-serif'; font-size: 10pt; mso-ansi-language: EN;"&gt;&lt;BR /&gt;NEXT vFile&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 13:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479829#M179313</guid>
      <dc:creator />
      <dc:date>2013-10-25T13:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479830#M179314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New file format is already taken care. I want to know to just the below. Same thing which I have asked in my previous post. (i,e) Everytime when it loads it should load latest two file only. I mean to say if Jan-2013 is the latest it should load Jan-2013 and Dec-2012 only. Hope it is understandable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;What will be the change in below IF statement if I want to load latest 2 months of data. Please advice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;//if '$(vFileName)' follows '2013_07' then&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 13:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479830#M179314</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-10-25T13:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479831#M179315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 16px;"&gt;LET TwoMonths = date(AddMonths(Today(),-2),'YYYY_MM');&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 16px;"&gt;//if '$(vFileName)' follows '$(&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 16px;"&gt;TwoMonths&lt;/SPAN&gt;)' then&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 17:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479831#M179315</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-26T17:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479832#M179316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should mark this question as answered...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 17:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479832#M179316</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-26T17:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479833#M179317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. I will check and update you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way when we are in the starting of the year(Jan-2014), will it load Jan-2014 data and Dec-2013 data? Please answer...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I don't have the access I couldn't verify that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 18:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479833#M179317</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-10-26T18:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479834#M179318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way any idea how can I load latest 2 weeks of data? (i,e Current week and Previous week). Actually I was looking for that also. Also make sure that when we are in the first week of the year it should load first the current year and last week of the previous year as well. Any idea on this? Please help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 19:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479834#M179318</guid>
      <dc:creator>qlikviewforum</dc:creator>
      <dc:date>2013-10-26T19:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479835#M179319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 16px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;In Jan/2014 this variable &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13828729160719774" jivemacro_uid="_13828729160719774"&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, sans-serif; font-size: 16px;"&gt;LET TwoMonths = date(AddMonths(Today(),-2),'YYYY_MM');&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 16px; font-family: arial, helvetica, sans-serif;"&gt;will contain 2013_11 so "follow" operador will work fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 11:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479835#M179319</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-27T11:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479836#M179320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;= date(WeekStart(Today())-7,'YYYYMMDD') will return the 1st day of last week, so you can compare&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 11:24:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479836#M179320</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-10-27T11:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the two fields as same field from csv.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479837#M179321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not sure but can you try something like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each '$(vFileName)' follows all files in your folder(FileName_*).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If vFileName = max(Value in the folder)&amp;nbsp; (eg. if max value is 2013_07) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Put here your loading script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if vFileName = max(Value in the folder)- 1 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Put here your loading script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script will give you only two files because of your if condition in for loop.&lt;/P&gt;&lt;P&gt;Please update if it works, else just share any sample example so that you will get proper o/p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yojas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2013 17:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-the-two-fields-as-same-field-from-csv/m-p/479837#M179321</guid>
      <dc:creator />
      <dc:date>2013-10-27T17:58:24Z</dc:date>
    </item>
  </channel>
</rss>

