<?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: Straight Table-Sum of Rows divided by Expression Total in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318109#M408879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try to emulate the sum-of-rows using advanced aggregation, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( Aggr( &lt;EM&gt;YourCurrentExpression&lt;/EM&gt;, &lt;EM&gt;AllYourChartDimensionFields&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;=Sum(Aggr( Count(DISTINCT ID), Customer, Country))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use expression total total mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2017 20:58:38 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2017-04-25T20:58:38Z</dc:date>
    <item>
      <title>Straight Table-Sum of Rows divided by Expression Total</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318108#M408878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me insane.&amp;nbsp; Is there a simple way in a straight table to have an expression where you divide &lt;STRONG&gt;ONE expression total&lt;/STRONG&gt; that is a "Sum of Rows" by a &lt;STRONG&gt;SECOND expression total&lt;/STRONG&gt; that is simply an "Expression Total"? &lt;EM&gt;(referring to the Total Mode option in straight tables)&lt;/EM&gt;&amp;nbsp; Line by line with all the dimensions shown, the calculations work out perfectly fine obviously, but when you get to the overall total at the bottom, it simply does not calculate the overall &lt;STRONG&gt;Variance %&lt;/STRONG&gt; correctly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: Not sure if this is relevant but my 2 expressions in the above example are not just straight sums--- The first one is, hence why i utilize the default "Expression Total" in the total mode...but my second expression MUST utilize the "Sum of Rows" total mode due to the fact that its a &lt;STRONG&gt;RangeMax&lt;/STRONG&gt; formula that takes either a different existing expression result OR a variable that is input by the user on dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 19:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318108#M408878</guid>
      <dc:creator>jjohnstonti618</dc:creator>
      <dc:date>2017-04-25T19:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table-Sum of Rows divided by Expression Total</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318109#M408879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try to emulate the sum-of-rows using advanced aggregation, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( Aggr( &lt;EM&gt;YourCurrentExpression&lt;/EM&gt;, &lt;EM&gt;AllYourChartDimensionFields&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;=Sum(Aggr( Count(DISTINCT ID), Customer, Country))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use expression total total mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 20:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318109#M408879</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-04-25T20:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table-Sum of Rows divided by Expression Total</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318110#M408880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for quick reply.&amp;nbsp; This mode will indeed work.&amp;nbsp; I was utilizing this same &lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt; approach on earlier expressions in my table already; HOWEVER, i did not realize that you cannot utilize a relabeled expression " in this sum(aggr( formula..or atleast that appears to have been my issue cuz after i renamed it, it works fine now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, i pull in a field called &lt;STRONG&gt;Sales&lt;/STRONG&gt; from the script load and load it as an expression formula&lt;STRONG&gt; sum(aggr( Sales, Dim1, Dim2, etc))...but then &lt;/STRONG&gt;i re-label it as "&lt;STRONG&gt;Super Sales&lt;/STRONG&gt;" in the straight table.&amp;nbsp; THEN I try to perform a sum(aggr( on &lt;STRONG&gt;Super Sales (blue text)&lt;/STRONG&gt; in a new expression and it doesnt work--i just get all zeros.&amp;nbsp; I had to switch it back to Sales (maroon text).&amp;nbsp; Anyway, Im rambling now.&amp;nbsp; Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 21:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Sum-of-Rows-divided-by-Expression-Total/m-p/1318110#M408880</guid>
      <dc:creator>jjohnstonti618</dc:creator>
      <dc:date>2017-04-25T21:33:25Z</dc:date>
    </item>
  </channel>
</rss>

