<?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: Multiply out matching rows in same table (Weighted Average) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211538#M388563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the expected number you are hoping to see here? 2.62 for the sample? If this is right, then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(Sum({&amp;lt;Section = {B}&amp;gt;}[Non Domestic]) + Sum({&amp;lt;Section = {B}&amp;gt;}[Domestic]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({&amp;lt;Section = {C}&amp;gt;}[Non Domestic]) + Sum({&amp;lt;Section = {C}&amp;gt;}[Domestic]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141668_Capture.PNG" style="height: 429px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Oct 2016 06:02:39 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-24T06:02:39Z</dc:date>
    <item>
      <title>Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211537#M388562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, need some help please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a single large table which contains a union of several Monthly data sections imported from Excel, e.g. Section B values represent number of switches of accounts, and Section C represents the average switching time of these accounts, I have 2 different values for Domestic and Non-Domestic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a Pivot chart broken down by File Month, Supplier showing the average switching time for all accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve this I need to first of all multiply out the number of switches by the average switching time matching on Supplier and Region separately for both Domestic and non-domestic values, then sum the total of all these and finally divide by the total count of all switches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Average calculation.PNG" class="jive-image image-1" src="/legacyfs/online/141639_Average calculation.PNG" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a data sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 16:48:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211537#M388562</guid>
      <dc:creator />
      <dc:date>2016-10-22T16:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211538#M388563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the expected number you are hoping to see here? 2.62 for the sample? If this is right, then try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(Sum({&amp;lt;Section = {B}&amp;gt;}[Non Domestic]) + Sum({&amp;lt;Section = {B}&amp;gt;}[Domestic]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({&amp;lt;Section = {C}&amp;gt;}[Non Domestic]) + Sum({&amp;lt;Section = {C}&amp;gt;}[Domestic]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141668_Capture.PNG" style="height: 429px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 06:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211538#M388563</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T06:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211539#M388564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, thanks for the reply, unfortunately this isn't quite what I need, the value should be as in the sample 17.97, I need to multiply the individual Non Domestic and Domestic count values separately by the corresponding switching times and then sum them and divide by the total of both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt; (Domestic Count * Switching Time (each row))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,(Non-Domestic Count * Switching Time (each row))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;/Sum(Total count of (Domestic + Non-Domestic)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have a feeling this may not be possible because its kind of a row by row calculation, and the Pivot table inly has Supplier as dimension,but not sure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Many thanks!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 09:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211539#M388564</guid>
      <dc:creator />
      <dc:date>2016-10-24T09:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211540#M388565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is possible, but you need to explain how you are coming up with these numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141723_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I can come up with these numbers, I can come up with a solution. Can you may be show the formulas behind these numbers? Right now they are seem to be pasted as values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 14:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211540#M388565</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T14:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211541#M388566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, apologies I pasted the wrong values in the spreadsheet, I've now amended it and kept the formulas in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it makes sense now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many&amp;nbsp; thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 15:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211541#M388566</guid>
      <dc:creator />
      <dc:date>2016-10-24T15:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211542#M388567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(RangeSum(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Section = {C}&amp;gt;}[Non Domestic]) * Sum({&amp;lt;Section = {B}&amp;gt;} [Non Domestic]),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Section = {C}&amp;gt;}[Domestic]) * Sum({&amp;lt;Section = {B}&amp;gt;} [Domestic])), [Supplier Name], &lt;SPAN style="color: #ff0000;"&gt;Region&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&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;STRONG&gt;RangeSum(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Section = {B}&amp;gt;}[Non Domestic]),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Section = {B}&amp;gt;}[Domestic]))&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;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141730_Capture.PNG" style="height: 276px; width: 620px;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the assumption was that the Region was the most granular information which made each row unique within a particular section. If you have more granular information, replace Region with that more granular field name in the Aggr function (colored in red above)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 15:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211542#M388567</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T15:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211543#M388568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, sorry for delay, this seems to work fine, I was also thinking that using ONLY without RangeSum might work but this is great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 11:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211543#M388568</guid>
      <dc:creator />
      <dc:date>2016-11-07T11:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply out matching rows in same table (Weighted Average)</title>
      <link>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211544#M388569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have finally got what you needed, I would suggest you to close this thread by marking correct and helpful responses.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&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 Nov 2016 01:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiply-out-matching-rows-in-same-table-Weighted-Average/m-p/1211544#M388569</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-08T01:48:53Z</dc:date>
    </item>
  </channel>
</rss>

