<?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 Assign Excel file name to a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406848#M425906</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;I have excel files with the name that include the date. I would like to extract this date in the file name and assign it to a variable.&lt;/P&gt;&lt;P&gt;Any thoughts how I could achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the below expression to extract the date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FileBaseName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),'-',1),'YYYYMMDD'),'DD-MMM-YYYY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Nov 2017 06:30:34 GMT</pubDate>
    <dc:creator>divya_anand</dc:creator>
    <dc:date>2017-11-03T06:30:34Z</dc:date>
    <item>
      <title>Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406848#M425906</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;I have excel files with the name that include the date. I would like to extract this date in the file name and assign it to a variable.&lt;/P&gt;&lt;P&gt;Any thoughts how I could achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the below expression to extract the date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FileBaseName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),'-',1),'YYYYMMDD'),'DD-MMM-YYYY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 06:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406848#M425906</guid>
      <dc:creator>divya_anand</dc:creator>
      <dc:date>2017-11-03T06:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406849#M425907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide the sample Filename??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 06:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406849#M425907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T06:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406850#M425908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi divya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression looks fine. To assign a value to a variable you can use Peek() after the load statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 06:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406850#M425908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T06:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406851#M425909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to split expression and check then date and date#&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 07:08:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406851#M425909</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-03T07:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406852#M425910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you cant assign variable properly in a load statement.&lt;/P&gt;&lt;P&gt;can you do the assignment of variable and load statement separately?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 08:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406852#M425910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-03T08:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign Excel file name to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406853#M425911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;is it one file or more?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is one File and the data is in your table you can try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FileBaseName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),'-',1),'YYYYMMDD'),'DD-MMM-YYYY')&amp;nbsp; as Filename&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp_Filename:&lt;/P&gt;&lt;P&gt;Load Max(&lt;SPAN style="font-size: 8pt;"&gt;Filename&lt;/SPAN&gt;) as tempMax Resident &lt;EM&gt;NameofyourTable&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;let v_Filename = FieldValue ('tempMax',1);&lt;/P&gt;&lt;P&gt;Drop Table Temp_Filename;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case you have more than one filenames you must work with a for each loop and a variable instead of the filename.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 09:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-Excel-file-name-to-a-variable/m-p/1406853#M425911</guid>
      <dc:creator>Ralf_Heukäufer</dc:creator>
      <dc:date>2017-11-03T09:44:39Z</dc:date>
    </item>
  </channel>
</rss>

