<?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: Only load fields specified in a file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126266#M603325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached QVW file. I have taken some sample data and worked on your question. I am also attaching the sample data files for better understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; &lt;STRONG&gt;ExcelColumnsThomas.xlsx&lt;/STRONG&gt; contains only the column names.&lt;/P&gt;&lt;P&gt;--&amp;gt; &lt;STRONG&gt;ExcelDataThomas.xlsx&lt;/STRONG&gt; contains the data for the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An elaborate explanation of what I have done in the QVW file. Please see below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Explanation:- &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. I have used Concat script function to combine the column names in the first excel into one row delimiting by a comma.&lt;/P&gt;&lt;P&gt;2. Assigned that value to a variable using a Let function. Here for getting the field value, I have used FieldValue function, you can also use any other function like the Peek function.&lt;/P&gt;&lt;P&gt;3. Used this variable in the load statement of the second excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you got your answer. Kindly let me know if you need further information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sarat.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Aug 2018 09:31:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-11T09:31:26Z</dc:date>
    <item>
      <title>Only load fields specified in a file</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126265#M603324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to specify a list of field names in a file (a list of 50 fields, for example). I would then like to read this file and use this list of field names to pull only this data from my data source.&amp;nbsp; How can I do this within QlikView?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have (1) a data mart with 100 fields (an excel workbook in this example), and (2) a config file (xls) which identifies exactly 5 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My5Columns.xls:&lt;/P&gt;&lt;P&gt;[Cols]&lt;/P&gt;&lt;P&gt;col1&lt;/P&gt;&lt;P&gt;col2&lt;/P&gt;&lt;P&gt;col3&lt;/P&gt;&lt;P&gt;col4&lt;/P&gt;&lt;P&gt;col5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Load the contents of the config file into memory --- maybe a cross-tab table?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My5Columns:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Cols&lt;/P&gt;&lt;P&gt;From&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;[..\My5Columns.xls]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is [ColumnList]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyFinalDataResults:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &amp;lt;-------&amp;nbsp; This should not be an asterisk this should be the list of fields pulled from the file called "my5columns"&lt;/P&gt;&lt;P&gt;From&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;[..\MyDataSource.xls]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is [DataMart]);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126265#M603324</guid>
      <dc:creator>tdegen_qlik</dc:creator>
      <dc:date>2018-08-10T02:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Only load fields specified in a file</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126266#M603325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached QVW file. I have taken some sample data and worked on your question. I am also attaching the sample data files for better understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; &lt;STRONG&gt;ExcelColumnsThomas.xlsx&lt;/STRONG&gt; contains only the column names.&lt;/P&gt;&lt;P&gt;--&amp;gt; &lt;STRONG&gt;ExcelDataThomas.xlsx&lt;/STRONG&gt; contains the data for the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An elaborate explanation of what I have done in the QVW file. Please see below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Explanation:- &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. I have used Concat script function to combine the column names in the first excel into one row delimiting by a comma.&lt;/P&gt;&lt;P&gt;2. Assigned that value to a variable using a Let function. Here for getting the field value, I have used FieldValue function, you can also use any other function like the Peek function.&lt;/P&gt;&lt;P&gt;3. Used this variable in the load statement of the second excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you got your answer. Kindly let me know if you need further information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sarat.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2018 09:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126266#M603325</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-11T09:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Only load fields specified in a file</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126267#M603326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is awesome &lt;A href="https://community.qlik.com/people/saratchandra30"&gt;saratchandra30&lt;/A&gt;‌, but just want to offer few upgrades&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Add square brackets while concatenating because the field names might have spaces (check the update documents where I changed Col1 to Col 1)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concat(&lt;SPAN style="color: #ff0000;"&gt;'[' &amp;amp;&lt;/SPAN&gt; ColumnNames&lt;SPAN style="color: #ff0000;"&gt; &amp;amp; ']'&lt;/SPAN&gt; ,', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) You don't need to concatenate on a resident load, you can save time by directly concatenating from the Excel load to run the script faster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Columns:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD Concat('[' &amp;amp; ColumnNames &amp;amp; ']' ,', ') as Temp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM ExcelColumnsThomas.xlsx&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LET val = FieldValue('Temp',1);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Final:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD $(val)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM ExcelDataThomas.xlsx&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;DROP Table Columns;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2018 11:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126267#M603326</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-11T11:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Only load fields specified in a file</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126268#M603327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ for the upgrades.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2018 11:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-fields-specified-in-a-file/m-p/126268#M603327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-11T11:31:05Z</dc:date>
    </item>
  </channel>
</rss>

