<?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: Transform table in load script, turning column values into row values depending on Key in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158803#M93933</link>
    <description>&lt;P&gt;Awesome.. like it&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jan 2024 17:15:17 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2024-01-06T17:15:17Z</dc:date>
    <item>
      <title>Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2157926#M93813</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;I want to turn this:&lt;/STRONG&gt;&lt;BR /&gt;Test:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Inline&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Key, Department, Year&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, a, 1999&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, b, 2000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, a, 2001&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2, b, 2000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3, c, 1987&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3, d, 1990&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3, a, 2000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Into this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Key&amp;nbsp; &amp;nbsp; &amp;nbsp;Dep1&amp;nbsp; &amp;nbsp; &amp;nbsp;Dep2&amp;nbsp; &amp;nbsp; &amp;nbsp;Dep3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;How can I achieve this output in the load editor?&amp;nbsp; I don't think CrossTable or Generic will work.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thank you&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 14:32:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2157926#M93813</guid>
      <dc:creator>Usafza</dc:creator>
      <dc:date>2024-01-03T14:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158093#M93826</link>
      <description>&lt;P&gt;what do you want to do with year field in this output??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 04:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158093#M93826</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-01-04T04:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158187#M93836</link>
      <description>&lt;P&gt;The Year field is there to show the order in which a case goes through departments. I dont need it in the final output, but it can be used to order the input table or in another way as a tool to determine the order for departments.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 09:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158187#M93836</guid>
      <dc:creator>Usafza</dc:creator>
      <dc:date>2024-01-04T09:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158566#M93891</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/The-Generic-Load/ba-p/1473470" target="_blank"&gt;The Generic Load - Qlik Community - 1473470&lt;/A&gt;&amp;nbsp;could be used - take a closer look on the second part of the posting in which is shown how to join all tables together again.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:27:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158566#M93891</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-01-05T09:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158568#M93892</link>
      <description>&lt;P&gt;Generic load not going to work for him, check his end output field name is different.&lt;/P&gt;
&lt;P&gt;I think hierarchy() or hierarchyBelongsto() function will help him.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158568#M93892</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-01-05T09:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158571#M93894</link>
      <description>&lt;P&gt;I ended up finding a solution. Not sure if it is the most efficient one but it did the job. For anyone with the same problem:&amp;nbsp;&lt;BR /&gt;I started with ordering the values in the table by Key and Year And subsequently introduced an ordering for each row based on its Key in a new load:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(Key&amp;lt;&amp;gt;previous(Key),1,peek('Order')+1) as Order&lt;BR /&gt;And just concatenating it with Department for the column names:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;'Department ' &amp;amp; Order as Attribute&lt;BR /&gt;Before doing the Generic load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Generic Load Key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Attribute,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Department&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158571#M93894</guid>
      <dc:creator>Usafza</dc:creator>
      <dc:date>2024-01-05T09:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158802#M93932</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test:
Generic
LOAD Key,
    'Dep'&amp;amp;Autonumber(RowNo(),Key) as Col,
    Department
Inline
[
Key, Department, Year
1, a, 1999
1, b, 2000
1, a, 2001
2, b, 2000
3, c, 1987
3, d, 1990
3, a, 2000
]
;
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commqv003.png" style="width: 167px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/126601i92B3F2C168314E1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="commqv003.png" alt="commqv003.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 16:56:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158802#M93932</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2024-01-06T16:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transform table in load script, turning column values into row values depending on Key</title>
      <link>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158803#M93933</link>
      <description>&lt;P&gt;Awesome.. like it&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 17:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Transform-table-in-load-script-turning-column-values-into-row/m-p/2158803#M93933</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-01-06T17:15:17Z</dc:date>
    </item>
  </channel>
</rss>

