<?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: Summing up Like terms in a field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687456#M52378</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your expression should be&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Aggr((Sum(A)-Sum(B))/Sum(B),[Product Number],MPG))&lt;/P&gt;&lt;P&gt;and the dimension is MPG&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 19:54:34 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2020-03-24T19:54:34Z</dc:date>
    <item>
      <title>Summing up Like terms in a field and finding individual avg based on the like terms</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687451#M52377</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a similar table in my data load:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;Product Number&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;MPG&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;A&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;111aaaa&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;A5&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;21&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;2.2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;222bbb&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;B6&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;53&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;3c3c3c&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;A5&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;56&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;31&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;As34s43&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;9T&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;54&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;P&gt;ADSWRW22&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;B6&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;432&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;FWE544SD&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;9T&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;214&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ADS540-FD&lt;/TD&gt;&lt;TD&gt;A5&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i want to do is collect like terms in the MPG column and (A-B)/B for each distinct MPG. After finding the Change, i would also like to find individual avg of EACH MPG. so basically divide the change by the number of times an MPG occurs in the original table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting Table: (NOTE: Change and AVG(Change) columns don't have to be separated as long as the avg is found)&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;MPG&lt;/TD&gt;&lt;TD width="25%"&gt;Change&lt;/TD&gt;&lt;TD width="25%"&gt;Individual AVG(Change)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;A5&lt;/TD&gt;&lt;TD width="25%"&gt;(21-2.2)/2.2 + (56-31)/31&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;(21-2.2)/2.2 + (56-31)/31 + (32-5)/5&lt;FONT color="#FF0000"&gt;)/3&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;B6&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;(53-6)/6 + (432-12)/12&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;(53-6)/6 + (432-12)/12&lt;FONT color="#FF0000"&gt;)/2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;9T&lt;/TD&gt;&lt;TD width="25%"&gt;(54-12)/12 + (214-56)/56&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;(54-12)/12 + (214-56)/56&lt;FONT color="#FF0000"&gt;)/2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You help is appreciated.&lt;/P&gt;&lt;P&gt;Please let me know if you require any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:53:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687451#M52377</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2024-11-16T18:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687456#M52378</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your expression should be&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Aggr((Sum(A)-Sum(B))/Sum(B),[Product Number],MPG))&lt;/P&gt;&lt;P&gt;and the dimension is MPG&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 19:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687456#M52378</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-03-24T19:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687478#M52380</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible to divide it by the number of MPG occurrences after?&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for example, all the values will be divided by 2 in the table above since each MPG appears twice. Basically like finding AVG after the sum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 22:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687478#M52380</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2020-03-24T22:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687527#M52384</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Can you explain with some example and expected output.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 06:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687527#M52384</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-03-25T06:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687678#M52400</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For sure, i can expand on my question. So, the resulting table would be something similar to the following table:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;MPG&lt;/TD&gt;&lt;TD width="50%"&gt;Change&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;A5&lt;/TD&gt;&lt;TD width="50%"&gt;((21-2.2)/2.2 + (56-31)/31)/&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;B6&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;((53-6)/6 + (432-12)/12)/&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;9T&lt;/TD&gt;&lt;TD width="50%"&gt;((54-12)/12 + (214-56)/56)/&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so basically, after the expression you wrote above, i would like to divide it by the number of time a MPG occurs. So, in the table above, A5 appears twice and so does the other two MPGs.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 14:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1687678#M52400</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2020-03-25T14:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1688552#M52521</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the expression you gave in your reply, sums everything up for one MPG value. it doesnt put them in their respective place.&lt;/P&gt;&lt;P&gt;FIGURE1:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 373px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/30756iBA2702F10B73BAE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;my chart expression is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(Aggr((Sum(FSIML2NP)-Sum("C L2 NP"))/Sum("C L2 NP"),[oM_PN],"F MPG"))&lt;/P&gt;&lt;P&gt;does the product number in your expression have to be uniqe? what is the use of?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 15:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1688552#M52521</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2020-03-27T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1688678#M52547</link>
      <description>&lt;P&gt;Where did "Code Value" come from? It's not in the original question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the data is as shown in your original post and the dimension is MPG, I think the correct expression is:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Sum&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;((&lt;/SPAN&gt;A&lt;SPAN class="s2"&gt;-&lt;/SPAN&gt;B&lt;SPAN class="s2"&gt;)/&lt;/SPAN&gt;B&lt;SPAN class="s2"&gt;) / &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;[Product Number]&lt;SPAN class="s2"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 22:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1688678#M52547</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2020-03-27T22:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up Like terms in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1689259#M52603</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;"Code Value" is MPG in the original post. Also, im not sure why would you divide it by Count[Product Number]. The reason i have &lt;FONT color="#FF0000"&gt;/2&lt;/FONT&gt;&amp;nbsp;in one of my replies is because each MPG appears twice in the original table. In my actual dataset, one MPG value could appear 200 times.&lt;/P&gt;&lt;P&gt;your expression would just divide it by the total numbers of product numbers. my problem requires diving it by the number of time EACH MPG occurs in a table.&lt;/P&gt;&lt;P&gt;Please let me know if you require more information.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 03:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-up-Like-terms-in-a-field-and-finding-individual-avg/m-p/1689259#M52603</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2020-03-31T03:06:46Z</dc:date>
    </item>
  </channel>
</rss>

