<?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: Opposite crosstable from an existing table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724405#M722433</link>
    <description>&lt;P&gt;the for loop is used to combine the Generic load tables&lt;/P&gt;&lt;P&gt;Can you test without, i.e&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Table1:

Generic Load * Inline [

OrderNumber,Zone,Volume

1,A,58

1,B,12

1,C,46

2,A,43

2,C,64

10000,E,3

];&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 02 Jul 2020 10:17:24 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-07-02T10:17:24Z</dc:date>
    <item>
      <title>Opposite crosstable from an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724023#M722429</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All previous post that I found was in order to do the opposite than my request&lt;/P&gt;&lt;P&gt;I would like to crosstable as an existing table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current data looks like:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load*Inline [&lt;/P&gt;&lt;P&gt;OrderNumber,Zone,Volume&lt;/P&gt;&lt;P&gt;1,A,58&lt;/P&gt;&lt;P&gt;1,B,12&lt;/P&gt;&lt;P&gt;1,C,46&lt;/P&gt;&lt;P&gt;2,A,43&lt;/P&gt;&lt;P&gt;2,C,64&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;10000,E,3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to cross it in a way that I'll have a table that looks like&lt;/P&gt;&lt;P&gt;Cross_Table1:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;OrderNumber,A,B,C,D,...,E&lt;/P&gt;&lt;P&gt;1,58,12,46...&lt;/P&gt;&lt;P&gt;2,43,,64....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;10000,,,,,3....&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724023#M722429</guid>
      <dc:creator>shahafei2</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite crosstable from an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724105#M722430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maye be Generic load :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Table1:

Load*Inline [

OrderNumber,Zone,Volume

1,A,58

1,B,12

1,C,46

2,A,43

2,C,64

10000,E,3

];


Crosstable:

Load distinct OrderNumber resident Table1;


DATA:

 Generic LOAD * resident Table1;
 
 drop table Table1;



FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));

  IF WildMatch('$(vTable)', 'DATA.*') THEN 

  LEFT JOIN ([Crosstable]) 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: 808px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36766i02B77D50657A72B2/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>Wed, 01 Jul 2020 13:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724105#M722430</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-01T13:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite crosstable from an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724400#M722431</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Taoufiq ZARRA,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to run it but it is taking too long (I have a few millions of records to record, it's run for almost 12 hours and didn't finish yet )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;any other suggestion?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 10:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724400#M722431</guid>
      <dc:creator>shahafei2</dc:creator>
      <dc:date>2020-07-02T10:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite crosstable from an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724405#M722433</link>
      <description>&lt;P&gt;the for loop is used to combine the Generic load tables&lt;/P&gt;&lt;P&gt;Can you test without, i.e&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Table1:

Generic Load * Inline [

OrderNumber,Zone,Volume

1,A,58

1,B,12

1,C,46

2,A,43

2,C,64

10000,E,3

];&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Jul 2020 10:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724405#M722433</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-02T10:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Opposite crosstable from an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724412#M722435</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;my mistake,&lt;/P&gt;&lt;P&gt;I found out that the reason was that I had a few more attributes in the source table&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the "*" did not work for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;I replaced it with the relevant attributes only and it runs in less than a minute&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 10:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Opposite-crosstable-from-an-existing-table/m-p/1724412#M722435</guid>
      <dc:creator>shahafei2</dc:creator>
      <dc:date>2020-07-02T10:51:45Z</dc:date>
    </item>
  </channel>
</rss>

