<?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 Transpose in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750632#M591464</link>
    <description>&lt;P&gt;Hi all! I have a csv file that I want to transpose in the load script. I know there is a wizard for this, but doesn't seem to do it correctly. My data looks like this (simplified):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Record | Field&amp;nbsp; | Value&lt;/P&gt;&lt;P&gt;1 | Firstname&amp;nbsp; | Harrison&lt;/P&gt;&lt;P&gt;1 | Lastname | Ford&lt;/P&gt;&lt;P&gt;2 | Firstname | Will&lt;/P&gt;&lt;P&gt;2 | Lastname | Smith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want it to be loaded like this&lt;/P&gt;&lt;P&gt;Record | Firstname | Lastname&lt;/P&gt;&lt;P&gt;1 | Harrison | Ford&lt;/P&gt;&lt;P&gt;2 | Will | Smith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 10:24:42 GMT</pubDate>
    <dc:creator>Maverick974</dc:creator>
    <dc:date>2020-10-08T10:24:42Z</dc:date>
    <item>
      <title>Transpose in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750632#M591464</link>
      <description>&lt;P&gt;Hi all! I have a csv file that I want to transpose in the load script. I know there is a wizard for this, but doesn't seem to do it correctly. My data looks like this (simplified):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Record | Field&amp;nbsp; | Value&lt;/P&gt;&lt;P&gt;1 | Firstname&amp;nbsp; | Harrison&lt;/P&gt;&lt;P&gt;1 | Lastname | Ford&lt;/P&gt;&lt;P&gt;2 | Firstname | Will&lt;/P&gt;&lt;P&gt;2 | Lastname | Smith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want it to be loaded like this&lt;/P&gt;&lt;P&gt;Record | Firstname | Lastname&lt;/P&gt;&lt;P&gt;1 | Harrison | Ford&lt;/P&gt;&lt;P&gt;2 | Will | Smith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 10:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750632#M591464</guid>
      <dc:creator>Maverick974</dc:creator>
      <dc:date>2020-10-08T10:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750643#M591465</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/127371"&gt;@Maverick974&lt;/a&gt;&amp;nbsp; One solution :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Input:

LOAD * INLINE [
Record,Field,Value
1,Firstname,Harrison
1,Lastname,Ford
2,Firstname,Will
2,Lastname,Smith
];

CombinedGenericTable:

Load distinct Record resident Input;

DATA:
 Generic LOAD Record,Field,Value resident Input;


drop table Input;   

FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));

  IF WildMatch('$(vTable)', 'DATA.*') THEN 

  LEFT JOIN ([CombinedGenericTable]) LOAD distinct * RESIDENT [$(vTable)];

  DROP TABLE [$(vTable)];

  ENDIF 

NEXT i&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 390px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41919iD2A33AAAB449EB38/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 10:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750643#M591465</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-08T10:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750687#M591466</link>
      <description>&lt;P&gt;Amazing, Taoufiq! Worked like a charm! Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 12:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1750687#M591466</guid>
      <dc:creator>Maverick974</dc:creator>
      <dc:date>2020-10-08T12:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1941616#M1219356</link>
      <description>&lt;P&gt;Hi Taoufiq,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I store the new output in a qvd file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 12:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transpose-in-load-script/m-p/1941616#M1219356</guid>
      <dc:creator>moath</dc:creator>
      <dc:date>2022-06-09T12:21:36Z</dc:date>
    </item>
  </channel>
</rss>

