<?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 Split a row into multiple rows (not subfield) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230693#M82505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope there was a solution different from this. I have already tried to do a "for ... next" cycle but qlik seems not to appreciate it!!!! &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;P&gt;So I was wondering if there is a better solution for this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2010 13:39:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-22T13:39:52Z</dc:date>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230690#M82502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question.&lt;/P&gt;&lt;P&gt;I have to split a single row with 3similar distinct fileds, lets say f1,f2,f3, into 3distinct rows with fields &lt;B&gt;f&lt;/B&gt; and &lt;B&gt;id&lt;/B&gt; (where id=1 if field is f1, id=2 if field is f2, id =3 if field is f3).&lt;/P&gt;&lt;P&gt;That is to say starting from a single row in my table I would like to load 10 distinct rows with an id number.&lt;/P&gt;&lt;P&gt;Example of initial row:&lt;/P&gt;&lt;P&gt;Customer_Id, Customer_Name, f1, f2, f3;&lt;/P&gt;&lt;P&gt;What I need is to obtain a table like this:&lt;/P&gt;&lt;P&gt;Customer_id, Customer_Name, id_field, f&lt;/P&gt;&lt;P&gt;with 3 different rows for each (Customer_Id, Customer_Name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible? How can I obtain this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to everybody and have a very Merry Xmas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 11:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230690#M82502</guid>
      <dc:creator />
      <dc:date>2010-12-22T11:31:11Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230691#M82503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;you've got 2 ways at least to do it.&lt;BR /&gt;If the data comes from a file, load it using CROSSTABLE statement.&lt;BR /&gt;if the data is already loaded from an other table go through as many time you need either using a loop or a function with number argument (1, 2, 3) or simply but longer 3 tiles with a if like this:&lt;/P&gt;&lt;P&gt;for i = 1 to 3&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;customer_id, customer_name, f$(i) as id_f&lt;/P&gt;&lt;P&gt;from table&lt;/P&gt;&lt;P&gt;nexy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 12:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230691#M82503</guid>
      <dc:creator />
      <dc:date>2010-12-22T12:32:00Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230692#M82504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure thaere are better ways, this is just what I think about first:&lt;/P&gt;&lt;P&gt;FOR n=1 to 3&lt;BR /&gt;LOAD&lt;BR /&gt; Customer_id,&lt;BR /&gt; Customer_Name,&lt;BR /&gt; '$(n)' as id_field,&lt;BR /&gt; f$(n) as f&lt;BR /&gt;RESIDENT table;&lt;BR /&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 12:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230692#M82504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-22T12:37:05Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230693#M82505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope there was a solution different from this. I have already tried to do a "for ... next" cycle but qlik seems not to appreciate it!!!! &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;P&gt;So I was wondering if there is a better solution for this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 13:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230693#M82505</guid>
      <dc:creator />
      <dc:date>2010-12-22T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230694#M82506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;I hope my example will give a solution to your problem. &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 15:17:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230694#M82506</guid>
      <dc:creator />
      <dc:date>2010-12-22T15:17:21Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230695#M82507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the "for... next" method the script hangs... (the reload script time is about 3 minutes but it is freezed doing nothing since about 30 minutes....&lt;/P&gt;&lt;P&gt;I will try to use your method, Venugopal4s, also if actually I have 15 fields (not only 3)!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 15:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230695#M82507</guid>
      <dc:creator />
      <dc:date>2010-12-22T15:46:20Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230696#M82508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I strongly recommend what Christian suggested - CROSSTABLE, which can actually be used regardless of the source of the data. Using the InitialTable from the example from venugopal4s, you'd do this instead of all the different table loads:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;FinalTable:&lt;BR /&gt;CROSSTABLE (f,id,2)&lt;BR /&gt;LOAD&lt;BR /&gt; customer_id&lt;BR /&gt;,customer_name&lt;BR /&gt;,f1 as 1&lt;BR /&gt;,f2 as 2&lt;BR /&gt;,f3 as 3&lt;BR /&gt;RESIDENT InitialTable&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;This is easily extended to 15 fields, one line per field. The only thing even requiring us to list the fields above is that we decided we wanted values of '1' instead of 'f1' in field "f", though I make a habit of always listing my fields explicitly, so this wouldn't make any difference to me personally.&lt;/P&gt;&lt;P&gt;The only down side I'm aware of is that a crosstable load can take more memory in at least some cases than loading in a loop. As a result of that, one of my applications handled this sort of load with a loop for a long time - until we upgraded to 64-bit and added more memory to the server. I now always use crosstable for this sort of requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 02:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230696#M82508</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-23T02:25:49Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230697#M82509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;I tried with John solution, it worked like magic.&lt;/P&gt;&lt;P&gt;It's really more helpful to the beginners like me.&lt;/P&gt;&lt;P&gt;Thanks a lot John/christian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 07:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230697#M82509</guid>
      <dc:creator />
      <dc:date>2010-12-23T07:36:33Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230698#M82510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot John.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried with crosstable, it seemed to me a good solution but... my scipt hangs after loading the crosstable. Is is since about 2 hours that is waiting....(see the image below).&lt;/P&gt;&lt;P&gt;I don't' know how to solve my problem... &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/6320.load.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/6320.load.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 13:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230698#M82510</guid>
      <dc:creator />
      <dc:date>2010-12-23T13:59:36Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230699#M82511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be doing a crosstable on more fields than you intended, so are getting more rows than you intended. It's also possible that you simply don't have enough memory to convert the columns to rows using crosstable, and need a better computer or a less memory-intensive solution. But it's hard to debug remotely with no other information than "my script hangs".&lt;/P&gt;&lt;P&gt;Edit: Perhaps try only loading, say, a thousand rows of the data. If the crosstable works and produces the table structure you want, then it's probably a memory problem. If it produces something other than what you want, then you have a script problem to debug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 18:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230699#M82511</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-27T18:38:32Z</dc:date>
    </item>
    <item>
      <title>Split a row into multiple rows (not subfield)</title>
      <link>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230700#M82512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@All,&lt;/P&gt;&lt;P&gt;Thanks for the content of this thread, certainly helped me alot&lt;/P&gt;&lt;P&gt;I've also had some problems using CrossTable and haning today this has helped.&lt;/P&gt;&lt;P&gt;I've also discovered that when reading data from an xlsx that the colummn names need to be text not numeric when using CrossTable although they don't need to be if you do a simple LOAD!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 18:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-a-row-into-multiple-rows-not-subfield/m-p/230700#M82512</guid>
      <dc:creator />
      <dc:date>2011-03-09T18:06:21Z</dc:date>
    </item>
  </channel>
</rss>

