<?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: Needing quotient of sums of two expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811141#M286331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&amp;nbsp; That makes sense.&amp;nbsp; The ultimate objective is the quotient of the sum of each of the below divisors.&amp;nbsp; I will probably need to use aggr, just not very clear on syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;STRONG style=": ; color: red; font-size: 9pt; font-family: 'Courier New'; text-decoration: underline;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: red; font-family: 'Courier New'; font-size: 9pt;"&gt;[Unburdened Cost] - Avg(RECEIPT_PRICE)&lt;STRONG style="text-decoration: underline;"&gt;)&lt;/STRONG&gt;*Sum(fabs(RECEIPT_APPROVED_QUANTITY)) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #0070c0; font-family: 'Courier New'; font-size: 9pt;"&gt;sum(RECEIPT_AMOUNT) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="color: #0070c0; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #002060; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;The sum of expression in red / sum of expression in blue is what I’m needing.&amp;nbsp; Any help is appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2015 16:19:26 GMT</pubDate>
    <dc:creator>triciagdaly</dc:creator>
    <dc:date>2015-03-16T16:19:26Z</dc:date>
    <item>
      <title>Needing quotient of sums of two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811139#M286329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am needing a total for Overall PPV % that is quotient of using sums of&amp;nbsp; two expressions.&amp;nbsp; Sum(Ext Variance Amt/PPV) / Sum(Ext Price Paid), but not sure how to accomplish this.&amp;nbsp;&amp;nbsp;&amp;nbsp; The individual Overall % on the detail lines works fine - Ext Variance Amt/PPV / Ext Price Paid.&amp;nbsp; In the example attached, using Ext Variance Amt/PPV total of 165,252.01 and Ext Price Paid total of 2,034,568.83, the Overall PPV % should be 7.17%.&amp;nbsp; Any help would greatly be appreciated.&amp;nbsp; Also I have a screen shot attached for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811139#M286329</guid>
      <dc:creator>triciagdaly</dc:creator>
      <dc:date>2015-03-16T14:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Needing quotient of sums of two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811140#M286330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to think through your formulas a little...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You mix aggregated numbers with unaggregated, and then you will get problems like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="80860" alt="Image10.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80860_Image10.png" style="height: 181px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, in the image above, the [Unburdened Cost] is a reference to another measure, hence it is an aggregated number. But the RECEIPT_PRICE and the quantity are naked (not wrapped in aggregation functions) so they cannot always be evaluated&amp;nbsp; - especially not on the total row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to wrap these in aggregation functions. E.g. by&lt;/P&gt;&lt;P&gt;=([Unburdened Cost] - Avg(RECEIPT_PRICE))*Sum(fabs(RECEIPT_APPROVED_QUANTITY))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811140#M286330</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-03-16T15:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Needing quotient of sums of two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811141#M286331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&amp;nbsp; That makes sense.&amp;nbsp; The ultimate objective is the quotient of the sum of each of the below divisors.&amp;nbsp; I will probably need to use aggr, just not very clear on syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;STRONG style=": ; color: red; font-size: 9pt; font-family: 'Courier New'; text-decoration: underline;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: red; font-family: 'Courier New'; font-size: 9pt;"&gt;[Unburdened Cost] - Avg(RECEIPT_PRICE)&lt;STRONG style="text-decoration: underline;"&gt;)&lt;/STRONG&gt;*Sum(fabs(RECEIPT_APPROVED_QUANTITY)) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #0070c0; font-family: 'Courier New'; font-size: 9pt;"&gt;sum(RECEIPT_AMOUNT) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="color: #0070c0; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #002060; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;The sum of expression in red / sum of expression in blue is what I’m needing.&amp;nbsp; Any help is appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 16:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811141#M286331</guid>
      <dc:creator>triciagdaly</dc:creator>
      <dc:date>2015-03-16T16:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Needing quotient of sums of two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811142#M286332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you need Aggr(). I would go for exactly the formula you've written. However, you will probably need to correct the expression that defines [Unburdened Cost] also (and possibly also the other expressions) since also this contains naked field references. Then I think it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 17:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Needing-quotient-of-sums-of-two-expressions/m-p/811142#M286332</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-03-16T17:59:12Z</dc:date>
    </item>
  </channel>
</rss>

