<?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: Merge excel columns containing certain text? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698150#M673149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, but are the characters which separate middle part from pre postfix always the same? Then you could handle it he way I posted in the script and just change the subfield parameters appropriately... don't know how your data exactly, depends on if your separating characters variate systematically or are random. Last case would be problematic. But could also be solved&amp;nbsp; if you have a list of the fields without their post and prefixes (so "clear name") one could modify above script to check if these fields are contained in the table and then concatenate them to the complete field.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 21:45:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-03T21:45:19Z</dc:date>
    <item>
      <title>Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698146#M673145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to merge Excel columns &lt;SPAN style="text-decoration: underline;"&gt;containing&lt;/SPAN&gt; a certain column header text when loading Excel table into Qlikview?&lt;/P&gt;&lt;P&gt;I have a dynamicly changing Excel sheet with changing number of columns.&lt;/P&gt;&lt;P&gt;Columnnames are buildt up by prefix, stem an postfix.&lt;/P&gt;&lt;P&gt;Ex&lt;/P&gt;&lt;P&gt;1_Answer_1123342, 2_Answer_213231, ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an easy way to use wildcards or loops to concatenate all columns &lt;SPAN style="text-decoration: underline;"&gt;containing&lt;/SPAN&gt; header text "Answer" into one Field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 09:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698146#M673145</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2014-09-03T09:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698147#M673146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you share an excel file contains a sample of your data and the column that you want to generate .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 09:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698147#M673146</guid>
      <dc:creator>Yousef_Amarneh</dc:creator>
      <dc:date>2014-09-03T09:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698148#M673147</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;this script should work. But please note that this will only work when prefix and postfix do not change over several columns!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Columns:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;@1 as Column1;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sample.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, no labels, table is [My data], filters(&lt;/P&gt;&lt;P&gt;Transpose()&lt;/P&gt;&lt;P&gt;));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CleanCol:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;'[' &amp;amp; concat(Column1, ']&amp;amp;[') &amp;amp; ']' as Old,&lt;/P&gt;&lt;P&gt;ColumnClean&lt;/P&gt;&lt;P&gt;group by subfield(del, '|', 2) ,ColumnClean;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;subfield(subfield(Column1, ': ',2), '_',1) as ColumnClean,&lt;/P&gt;&lt;P&gt;Column1 &amp;amp; '|' &amp;amp;subfield(subfield(Column1, ': ',2), '_',1) as del,&lt;/P&gt;&lt;P&gt;Column1&lt;/P&gt;&lt;P&gt;Resident Columns where not isnull(subfield(subfield(Column1, ': ',2), '_',1)) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BaseTable: &lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;RowNo() as NoRow,&lt;/P&gt;&lt;P&gt;Date, &lt;/P&gt;&lt;P&gt;DateTime, &lt;/P&gt;&lt;P&gt;Location&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sample.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [My data]);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to (NoOfRows ('CleanCol') -1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vColOld$(i) = peek ('Old', $(i), 'CleanCol'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vColNew$(i) = peek('ColumnClean', $(i), 'CleanCol');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (BaseTable)&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;RowNo() as NoRow,&lt;/P&gt;&lt;P&gt;$(vColOld$(i)) as [$(vColNew$(i))]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sample.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [My data]);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Stefan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 15:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698148#M673147</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698149#M673148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately pre- and postfix changes constantly. Only middle part that is fixed...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 19:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698149#M673148</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2014-09-03T19:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698150#M673149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, but are the characters which separate middle part from pre postfix always the same? Then you could handle it he way I posted in the script and just change the subfield parameters appropriately... don't know how your data exactly, depends on if your separating characters variate systematically or are random. Last case would be problematic. But could also be solved&amp;nbsp; if you have a list of the fields without their post and prefixes (so "clear name") one could modify above script to check if these fields are contained in the table and then concatenate them to the complete field.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698150#M673149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T21:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merge excel columns containing certain text?</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698151#M673150</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;one possible solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_131737_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/65853_QlikCommunity_Thread_131737_Pic1.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14097860041972056" jivemacro_uid="_14097860041972056"&gt;
&lt;P&gt;tabInput:&lt;/P&gt;
&lt;P&gt;CrossTable (FieldName, FieldValue, 3)&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD * FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="123094" data-objecttype="13" href="http://community.qlik.com/servlet/JiveServlet/download/2061-131737-600456-123094/sample.xlsx"&gt;http://community.qlik.com/servlet/JiveServlet/download/600456-123094/sample.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is [My data]);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabOutput:&lt;/P&gt;
&lt;P&gt;Generic LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DateTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Location,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FieldNameComb,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Concat(FieldValue) as FieldValue&lt;/P&gt;
&lt;P&gt;Group By DateTime, Location, FieldNameComb;&lt;/P&gt;
&lt;P&gt;LOAD *, TextBetween(Replace(FieldName,'_',' '),' ',' ') as FieldNameComb&lt;/P&gt;
&lt;P&gt;Resident tabInput;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabInput;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 23:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-excel-columns-containing-certain-text/m-p/698151#M673150</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-03T23:13:12Z</dc:date>
    </item>
  </channel>
</rss>

