<?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 How to combine several column information into one column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149677#M27831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit: Doh! Beaten to the punch.&lt;/P&gt;&lt;P&gt;I think this would work:&lt;/P&gt;&lt;P&gt;CROSSTABLE (Gender,$,4)&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Date, Market, Media, Source, M, F&lt;BR /&gt; a, b, c, d, 12, 25&lt;BR /&gt; a, b, c, e, 54, 24&lt;BR /&gt; a, b, f, d, 78, 19&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Jul 2009 01:56:20 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2009-07-18T01:56:20Z</dc:date>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149675#M27829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, the subject is hardly explaining itself, so here's the example:&lt;/P&gt;&lt;P&gt;this is the raw data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Date, Market, Media, Source, Male$, Female$&lt;BR /&gt; a, b, c, d, 12, 25&lt;BR /&gt; a, b, c, e, 54, 24&lt;BR /&gt; a, b, f, d, 78, 19&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;as you can see, I have two numeric values here, Male$ and Female$.&lt;/P&gt;&lt;P&gt;Now I want to create another column called "Gender" and then combine $ into one column, so the table would be like&lt;/P&gt;&lt;P&gt;Date, Market, Media, Source, Gender, $&lt;/P&gt;&lt;P&gt;a,b,c,d,M,12&lt;/P&gt;&lt;P&gt;a,b,c,d,F,25&lt;/P&gt;&lt;P&gt;a,b,c,e,M,54&lt;/P&gt;&lt;P&gt;a,b,c,e,F,24&lt;/P&gt;&lt;P&gt;a,b,f,d,M,78&lt;/P&gt;&lt;P&gt;a,b,f,d,F,19&lt;/P&gt;&lt;P&gt;Could anyone please tell me how to do the script to make the data like that?&lt;/P&gt;&lt;P&gt;Thank you!!s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 01:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149675#M27829</guid>
      <dc:creator />
      <dc:date>2009-07-18T01:39:49Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149676#M27830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use crosstable, like this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;STRONG&gt;CROSSTABLE (Gender, $, 4)&lt;/STRONG&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Date, Market, Media, Source, Male$, Female$&lt;BR /&gt; a, b, c, d, 12, 25&lt;BR /&gt; a, b, c, e, 54, 24&lt;BR /&gt; a, b, f, d, 78, 19];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 01:51:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149676#M27830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-18T01:51:56Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149677#M27831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit: Doh! Beaten to the punch.&lt;/P&gt;&lt;P&gt;I think this would work:&lt;/P&gt;&lt;P&gt;CROSSTABLE (Gender,$,4)&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Date, Market, Media, Source, M, F&lt;BR /&gt; a, b, c, d, 12, 25&lt;BR /&gt; a, b, c, e, 54, 24&lt;BR /&gt; a, b, f, d, 78, 19&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 01:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149677#M27831</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-18T01:56:20Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149678#M27832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;What if I have another kind of value besides $?&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt; Date, Market, Media, Source, Male$, Female$, MaleScore, FemaleScore&lt;BR /&gt; a, b, c, d, 12, 25, 45, 87&lt;BR /&gt; a, b, c, e, 54, 24, 91, 54&lt;BR /&gt; a, b, f, d, 78, 19, 42, 28&lt;BR /&gt; ]&lt;BR /&gt; ;&lt;/P&gt;&lt;P&gt;Can we make it as this?&lt;/P&gt;&lt;P&gt;Date, Market, Media, Source,Gender, $, Score&lt;/P&gt;&lt;P&gt;a, b, c, d, M, 12, 45&lt;BR /&gt; a, b, c, d, F, 25, 87&lt;BR /&gt; a, b, c, e, M, 54 ,91&lt;BR /&gt; a, b, c, e, F, 24, 54&lt;BR /&gt; a, b, f, d, M, 78, 42&lt;BR /&gt; a, b, f, d, F, 19, 28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 02:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149678#M27832</guid>
      <dc:creator />
      <dc:date>2009-07-18T02:07:21Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149679#M27833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry John&lt;IMG alt="Stick out tongue" src="http://community.qlik.com/emoticons/emotion-4.gif" /&gt;&lt;/P&gt;&lt;P&gt;In this case probably this way is easier:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;table1:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Date, Market, Media, Source, Male$, Female$, MaleScore, FemaleScore&lt;BR /&gt; a, b, c, d, 12, 25, 45, 87&lt;BR /&gt; a, b, c, e, 54, 24, 91, 54&lt;BR /&gt; a, b, f, d, 78, 19, 42, 28];&lt;BR /&gt; //&lt;BR /&gt; table:&lt;BR /&gt; LOAD&lt;BR /&gt; Date,&lt;BR /&gt; Market,&lt;BR /&gt; Media,&lt;BR /&gt; Source,&lt;BR /&gt; 'M' as Gender,&lt;BR /&gt; Male$ as $,&lt;BR /&gt; MaleScore as Score&lt;BR /&gt; RESIDENT table1;&lt;BR /&gt; LOAD&lt;BR /&gt; Date,&lt;BR /&gt; Market,&lt;BR /&gt; Media,&lt;BR /&gt; Source,&lt;BR /&gt; 'F' as Gender,&lt;BR /&gt; Female$ as $,&lt;BR /&gt; FemaleScore as Score&lt;BR /&gt; RESIDENT table1;&lt;BR /&gt; //&lt;BR /&gt; drop table table1;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 02:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149679#M27833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-18T02:23:51Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149680#M27834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank both of you!! &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 02:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149680#M27834</guid>
      <dc:creator />
      <dc:date>2009-07-18T02:34:24Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149681#M27835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple problems with a temporary table and three loads is high memory usage and slow performance. I can easily exceed the memory on my machine while testing, and have loads that take over an hour, so that's something I need to be conscious of.&lt;/P&gt;&lt;P&gt;If neither is a problem, I'd definitely use Michael's approach. It's the most straightforward.&lt;/P&gt;&lt;P&gt;But if you do have a memory or processing time problem, here are a couple alternatives. The first might (only might) be faster and might (only might) use less memory. It has no temporary table, and makes due with two loads, though both are more complicated than Michael's, which is why I don't guarantee they'll work faster and with less memory. Might be worth a shot if you have problems, though.&lt;/P&gt;&lt;P&gt;The second approach loads twice from your original data source to avoid a temporary table. Depending on the speed of pulling data from the original data source, that might be faster than the temp table approach, and it will certainly use less memory.&lt;/P&gt;&lt;P&gt;I like options. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;// First alternative&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;CROSSTABLE (Gender,Quantities,5)&lt;BR /&gt;LOAD&lt;BR /&gt; recno() as ID&lt;BR /&gt;,Date&lt;BR /&gt;,Market&lt;BR /&gt;,Media&lt;BR /&gt;,Source&lt;BR /&gt;,Male$&amp;amp;';'&amp;amp;MaleScore as M&lt;BR /&gt;,Female$&amp;amp;';'&amp;amp;FemaleScore as F&lt;BR /&gt;INLINE [&lt;BR /&gt;Date, Market, Media, Source, Male$, Female$, MaleScore, FemaleScore&lt;BR /&gt;a, b, c, d, 12, 25, 45, 87&lt;BR /&gt;a, b, c, e, 54, 24, 91, 54&lt;BR /&gt;a, b, f, d, 78, 19, 42, 28&lt;BR /&gt;];&lt;BR /&gt;LEFT JOIN (Table)&lt;BR /&gt;LOAD&lt;BR /&gt; ID&lt;BR /&gt;,subfield(Quantities,';',1) as $&lt;BR /&gt;,subfield(Quantities,';',2) as Score&lt;BR /&gt;RESIDENT Table&lt;BR /&gt;;&lt;BR /&gt;DROP FIELDS&lt;BR /&gt; ID&lt;BR /&gt;,Quantities&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;// Second alternative&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt; Date&lt;BR /&gt;,Market&lt;BR /&gt;,Media&lt;BR /&gt;,Source&lt;BR /&gt;,'M' as Gender&lt;BR /&gt;,Male$ as $&lt;BR /&gt;,MaleScore as Score&lt;BR /&gt;INLINE [&lt;BR /&gt;Date, Market, Media, Source, Male$, Female$, MaleScore, FemaleScore&lt;BR /&gt;a, b, c, d, 12, 25, 45, 87&lt;BR /&gt;a, b, c, e, 54, 24, 91, 54&lt;BR /&gt;a, b, f, d, 78, 19, 42, 28&lt;BR /&gt;];&lt;BR /&gt;CONCATENATE (Table) LOAD&lt;BR /&gt; Date&lt;BR /&gt;,Market&lt;BR /&gt;,Media&lt;BR /&gt;,Source&lt;BR /&gt;,'F' as Gender&lt;BR /&gt;,Female$ as $&lt;BR /&gt;,FemaleScore as Score&lt;BR /&gt;INLINE [&lt;BR /&gt;Date, Market, Media, Source, Male$, Female$, MaleScore, FemaleScore&lt;BR /&gt;a, b, c, d, 12, 25, 45, 87&lt;BR /&gt;a, b, c, e, 54, 24, 91, 54&lt;BR /&gt;a, b, f, d, 78, 19, 42, 28&lt;BR /&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 02:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149681#M27835</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-18T02:40:17Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149682#M27836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John,&lt;/P&gt;&lt;P&gt;you are right, memory is truly a huge concern for me becuase I am processing an enormous dataset.&lt;/P&gt;&lt;P&gt;I tried both of the methods you mentioned, the second one worked, however the first one using crosstable has duplicate records.&lt;/P&gt;&lt;P&gt;In the attached file, you can see that the table on the right hand side includes the record which is supposed to be gender M.&lt;/P&gt;&lt;P&gt;There should only be one unique record as the other table.&lt;/P&gt;&lt;P&gt;I prefer crosstable because it saves time to do several where statement to segment different groups from a huge dataset, which reload would be a problem.&lt;/P&gt;&lt;P&gt;Thank you for your help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 00:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149682#M27836</guid>
      <dc:creator />
      <dc:date>2009-07-23T00:33:09Z</dc:date>
    </item>
    <item>
      <title>How to combine several column information into one column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149683#M27837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I see the problem. My recno() as ID was happening BEFORE the crosstable, and therefore used the same ID for both GENDERs, leading to the duplication of records when we did the left join. It can be easily fixed by adding GENDER to the list of fields in the left join.&lt;/P&gt;&lt;P&gt;It probably won't be the approach you want if memory is the main problem, though. I think you'll want to use the second option. I had some script using the second option with a loop through 40 different values, loading from a resident table each time. I converted it to a crosstable load. That improved the execution time significantly (my main problem), but also significantly increased the memory requirements (not a big problem in my case). Testing various approaches with your real data is probably a good idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 03:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-several-column-information-into-one-column/m-p/149683#M27837</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-23T03:16:38Z</dc:date>
    </item>
  </channel>
</rss>

