<?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: subfield() creates extra rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992137#M338004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original data is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount, Products,&lt;/P&gt;&lt;P&gt;10, A, B&lt;/P&gt;&lt;P&gt;10, A, B &lt;/P&gt;&lt;P&gt;10, A, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using subfield():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount, Products,&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B,&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Causing sum(Amount) to be incorrect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2015 03:31:59 GMT</pubDate>
    <dc:creator>sifatnabil</dc:creator>
    <dc:date>2015-09-08T03:31:59Z</dc:date>
    <item>
      <title>subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992135#M338002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using subfield in script creates duplicate rows with the other delimited values, and when using sum(Amount) in a textbox, the summation is incorrect. How can this be rectified? e.g. if the original number of rows in script is 3, using subfield will double the number of rows to 6 if there are 2 subfields (like Product1, Product2). So sum(Amount) is doubled. Thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 02:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992135#M338002</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-08T02:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992136#M338003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the sample of your data for better understanding.&lt;/P&gt;&lt;P&gt;As subfield do not duplicates the data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 03:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992136#M338003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-08T03:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992137#M338004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original data is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount, Products,&lt;/P&gt;&lt;P&gt;10, A, B&lt;/P&gt;&lt;P&gt;10, A, B &lt;/P&gt;&lt;P&gt;10, A, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using subfield():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount, Products,&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B,&lt;/P&gt;&lt;P&gt;10, A,&lt;/P&gt;&lt;P&gt;10, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Causing sum(Amount) to be incorrect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 03:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992137#M338004</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-08T03:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992138#M338005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) May be use a aggregate function in the text box object to address this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Dim,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField(Product, '|') as Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim, Product, Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, Product 1|Product 2, 50&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, Product 1|Product 3, 90&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, Product 2|Product 3, 120&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in Table Box object:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98249_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression in Text Box object: &lt;STRONG&gt;=Sum(Aggr(Avg(Value), Dim))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use a Separate table for SubField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dim, Product, Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, Product 1|Product 2, 50&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, Product 1|Product 3, 90&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, Product 2|Product 3, 120&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Dim,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField(Product, '|') as Product1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression in Text Box Object: &lt;STRONG&gt;=Sum(Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 03:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992138#M338005</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-08T03:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992139#M338006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a preceeding load with distinct to eliminate the duplicates after your load with the subfield&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hth&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 04:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992139#M338006</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-08T04:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992140#M338007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;, the 2nd option works well. It preserves the original row count. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 07:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992140#M338007</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-08T07:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: subfield() creates extra rows</title>
      <link>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992141#M338008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya it does and the expression is also simpler &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad I was able to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 07:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/subfield-creates-extra-rows/m-p/992141#M338008</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-08T07:57:21Z</dc:date>
    </item>
  </channel>
</rss>

