<?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: Expression not working in Subtotals in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653743#M238921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/downloadBody/6670-102-1-8324/Sample Sales-Quota Data for QV.xls"&gt;http://community.qlik.com/servlet/JiveServlet/downloadBody/6670-102-1-8324/Sample%20Sales-Quota%20Data%20for%20QV.xls&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jun 2014 19:20:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-10T19:20:03Z</dc:date>
    <item>
      <title>Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653741#M238919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a pivot table with 5 dimensions.&amp;nbsp; One measure is “Sales”, another is “Quota”, the third is “Sales % of Quota”&amp;nbsp; (Sales/Quota).&amp;nbsp; As you can probably see where I am going…the calculation at the furthest level/dimensionality is working as expected, but at the Subtotals of the other levels, the "Sales % of Quota" calculation is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve tried messing around with the AGGR function in numerous forms, and have searched the forum, but have not yet found the correct solution.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 16:16:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653741#M238919</guid>
      <dc:creator />
      <dc:date>2014-06-10T16:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653742#M238920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can your share your sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 16:25:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653742#M238920</guid>
      <dc:creator>venkatg6759</dc:creator>
      <dc:date>2014-06-10T16:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653743#M238921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/downloadBody/6670-102-1-8324/Sample Sales-Quota Data for QV.xls"&gt;http://community.qlik.com/servlet/JiveServlet/downloadBody/6670-102-1-8324/Sample%20Sales-Quota%20Data%20for%20QV.xls&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 19:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653743#M238921</guid>
      <dc:creator />
      <dc:date>2014-06-10T19:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653744#M238922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the first measure is Sum(Sales), the second is Sum(Quota) and the third is Sum(Sales)/Sum(Quota), it should work straight off. What do you use as expressions? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should not need any Aggr() for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 22:22:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653744#M238922</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-10T22:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653745#M238923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; I'm using the following Expression...the "IF" statements are to eliminate managers from the [Full Name] dimension.&amp;nbsp; Also, the measure "SIM_Q" contains ONLY data for the current Quarter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;=sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ActDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QuarterStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vLoadDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Team Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Region Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Division Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ActCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt;/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Team Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Region Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Full Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Division Manager]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SIM_Q&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 23:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653745#M238923</guid>
      <dc:creator />
      <dc:date>2014-06-10T23:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653746#M238924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a little hard to tell what the issue is without understanding a little bit more about your data and their association. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Perhaps, a screenshot or a sample would help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 02:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653746#M238924</guid>
      <dc:creator>shawn-qv</dc:creator>
      <dc:date>2014-06-11T02:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653747#M238925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well your expression lacks an aggregation function in the first parameter of the if-function. That's why it cannot evaluate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field references (e.g. ActDate, ActCount, [Full Name], [Team Manager]) make sense if there is only one name, one manager etc. per dimensional value. But for the subtotals you have several, and then the expression cannot be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should work if you add an aggregation function, e.g.&lt;/P&gt;&lt;P&gt;Sum(if(ActDate &amp;gt;= Floor(QuarterStart(vLoadDate)) AND&lt;/P&gt;&lt;P&gt;[Full Name] &amp;lt;&amp;gt; [Team Manager] AND&lt;/P&gt;&lt;P&gt;[Full Name] &amp;lt;&amp;gt; [Region Manager] AND&lt;/P&gt;&lt;P&gt;[Full Name] &amp;lt;&amp;gt; [Division Manager], ActCount))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum(if([Full Name] &amp;lt;&amp;gt; [Team Manager] AND&lt;/P&gt;&lt;P&gt;[Full Name] &amp;lt;&amp;gt; [Region Manager] AND&lt;/P&gt;&lt;P&gt;[Full Name] &amp;lt;&amp;gt; [Division Manager], SIM_Q))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/08/06/it-s-all-aggregations" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/08/06/it-s-all-aggregations"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/08/06/it-s-all-aggregations&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>Wed, 11 Jun 2014 09:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653747#M238925</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-11T09:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working in Subtotals</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653748#M238926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possible suggestion is to populate and use a "manager flag" in the (master) data.&lt;/P&gt;&lt;P&gt;You could have one called [IsManager], and it need only be a 1 or 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will allow you to construct your expression like:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[IsManager] = {0}&amp;gt;} ActCount) / sum({&amp;lt;[IsManager] = {0}&amp;gt;} SIM_Q)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;NOTE&lt;/SPAN&gt;: In your script, the criteria for [IsManager] can be customize to account for Team, Region and Division Manager before assigning a 1. If there are more manager types, then that can also be added to the criteria.&lt;/P&gt;&lt;P&gt;Sometimes, having just one [IsManager] flag may not be enough, in which case you may populate additional flags for easier set expressions in your charts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 23:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-in-Subtotals/m-p/653748#M238926</guid>
      <dc:creator>shawn-qv</dc:creator>
      <dc:date>2014-06-11T23:08:13Z</dc:date>
    </item>
  </channel>
</rss>

