<?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 Help with using crosstables in resident load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828182#M1214160</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 fields: Item, Type and Value. Each item has 2 types, A and B. I would like to have 3 fields: Item, A and B so A would be Value when type is A and B would be Value when type is B. In other words I would like to get rid of Type field so I could sum Type A and B values separately easily. How would I do this, with crosstable?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 10:09:11 GMT</pubDate>
    <dc:creator>pgkrsk</dc:creator>
    <dc:date>2021-08-12T10:09:11Z</dc:date>
    <item>
      <title>Help with using crosstables in resident load</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828182#M1214160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 fields: Item, Type and Value. Each item has 2 types, A and B. I would like to have 3 fields: Item, A and B so A would be Value when type is A and B would be Value when type is B. In other words I would like to get rid of Type field so I could sum Type A and B values separately easily. How would I do this, with crosstable?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:09:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828182#M1214160</guid>
      <dc:creator>pgkrsk</dc:creator>
      <dc:date>2021-08-12T10:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using crosstables in resident load</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828184#M1214161</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think crosstable would be going the other way, so taking 2 fields A &amp;amp; B &amp;amp; turning them into a type fields, this sounds more like a pivot, so something like;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Load
	Dim,
	Sum(If(Type='A',Value)) AS A,
	Sum(If(Type='B',Value)) AS B
Group by Dim;
LOAD * INLINE[
Dim, Type, Value
X, A, 10
X, B, 5
Y, A, 20
Y, B, 15
];&lt;/LI-CODE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828184#M1214161</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-08-12T10:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using crosstables in resident load</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828192#M1214162</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/144149"&gt;@pgkrsk&lt;/a&gt;&amp;nbsp;&amp;nbsp; by using Generic Load, like :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Input:
LOAD * INLINE [
    Item, Type, Value
    1, A, 10
    2, B, 11
    3, A, 12
    4, B, 13
];

DATA:
 Generic LOAD
  Item, 
  Type, 
  Value
     
  Resident Input;
     
 CombinedGenericTable:

Load distinct Item  Resident Input;

 Drop Table   Input; 
 
   

FOR i = NoOfTables()-1 to 0 STEP -1

  LET vTable=TableName($(i));
  //trace $(i) - '$(vTable)';
  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="Taoufiq_Zarra_0-1628763895499.png"&gt;&lt;img src="https://community.qlik.com/skins/images/68186FF59415FE3F2BA91703C2AE6652/responsive_peak/images/image_not_found.png" alt="Taoufiq_Zarra_0-1628763895499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-crosstables-in-resident-load/m-p/1828192#M1214162</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-08-12T10:25:08Z</dc:date>
    </item>
  </channel>
</rss>

