<?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: Remove columns from load by name, not position in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593751#M683267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; If i've understood, new columns can be added, for exemple, how &lt;A href="https://community.qlik.com/qlik-users/77111"&gt;Nicole Smith&lt;/A&gt; said,&amp;nbsp; can be added at some point an Emp4 column . So, any time that it happens, the script will need to be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested @jerem1234 's solution, and it worked here, even changing the position of the column "OtherField".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2014 19:29:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-03-03T19:29:31Z</dc:date>
    <item>
      <title>Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593743#M683255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to remove columns from a cross table load by doing this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;CrossTable(Field, Value)&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;FROM test.csv&lt;/P&gt;
&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq, filters(&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remove(Col, Pos(Top, 2))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;));&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this removes the column by its position in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way that I can specify which column to remove by the column name?&amp;nbsp; The columns that I'm importing aren't always in the same order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 17:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593743#M683255</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-03T17:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593744#M683256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you load your sample file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 17:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593744#M683256</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-03T17:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593745#M683257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to cross table data that looks something like this (file also attached):&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;VendorID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;OtherField&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Emp1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Emp2&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Emp3&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1492&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1494&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1496&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1498&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1500&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following load script results in what I want (I want to remove OtherField and cross table the rest):&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;CrossTable(Emp, Value)&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;FROM test.csv&lt;/P&gt;
&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq, filters(&lt;/P&gt;
&lt;P&gt;Remove(Col, Pos(Top, 2))&lt;/P&gt;
&lt;P&gt;));&lt;/P&gt;



&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this only works when OtherField is the second column in the file.&amp;nbsp; It isn't always the second column in the file, so I need to be able to remove the column by the name, not the position.&amp;nbsp; I also need to use the asterisk (*) to load in all of the fields, because there may at some point be an Emp4 column, even though there isn't one right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is, is there a way in the remove statement to specify the name of the column to be removed instead of specifying the position of the column in the table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593745#M683257</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-03T18:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593746#M683259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about load your entire file, and after that drop the column that you don't want?&lt;/P&gt;&lt;P&gt;Something like it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;test.csv.txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop field OtherField;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593746#M683259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-03T18:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593747#M683260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the Drop Field (or Fields if multiple) command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Field NameOfField;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593747#M683260</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2014-03-03T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593748#M683262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/144710"&gt;Gabriel Rocha&lt;/A&gt; and &lt;A href="https://community.qlik.com/qlik-users/114259"&gt;jpapador&lt;/A&gt;--I know I can drop fields, but then I would have to do a resident load for the cross table.&amp;nbsp; I want to do the cross table during the initial load from the file.&amp;nbsp; Once the table has gone through the cross table transformation, I can no longer use drop statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 18:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593748#M683262</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-03T18:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593749#M683264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filters(&lt;/P&gt;&lt;P&gt;rotate(left),&lt;/P&gt;&lt;P&gt;Remove(Row,RowCnd(CellValue, 1, StrCnd(equal, 'Test'))),&lt;/P&gt;&lt;P&gt;Remove(Row,RowCnd(CellValue, 1, StrCnd(equal, 'Test2'))),&lt;/P&gt;&lt;P&gt;rotate(right)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 19:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593749#M683264</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-03-03T19:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593750#M683266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about explicitely listing the fields you want in the load (instead of LOAD * ...)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also prevent from getting things messed up when your VendorID is accidently not in the first column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CrossTable(Emp, Value)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD VendorID, Emp1, Emp2, Emp3&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM test.csv&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 19:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593750#M683266</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-03-03T19:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593751#M683267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; If i've understood, new columns can be added, for exemple, how &lt;A href="https://community.qlik.com/qlik-users/77111"&gt;Nicole Smith&lt;/A&gt; said,&amp;nbsp; can be added at some point an Emp4 column . So, any time that it happens, the script will need to be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested @jerem1234 's solution, and it worked here, even changing the position of the column "OtherField".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 19:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593751#M683267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-03T19:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove columns from load by name, not position</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593752#M683269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;, &lt;A href="https://community.qlik.com/qlik-users/144710"&gt;Gabriel Rocha&lt;/A&gt; is correct in that new columns can be added (such as Emp4), and that needs to be included in the cross table as well, so I am not able to name the fields explicitly.&amp;nbsp; VendorID will always be in the first column, so that one shouldn't be a problem.&amp;nbsp; It's the column that I need to remove that can move around (it can be anywhere from the second column to the last).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 19:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-columns-from-load-by-name-not-position/m-p/593752#M683269</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-03-03T19:46:54Z</dc:date>
    </item>
  </channel>
</rss>

