<?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 Max function causing inaccurate totals in pivot/straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130249#M371549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the attached application. Where max(sales) or max with any field is used the subtotals and totals are just the max values of each dimension and not total of all dimension values. Sum() calculates properly but this is just a sample app and in my application I have to use max function. I also used aggr with max and that solved the problem but as I said this is just a sample app. In the actual app there are lots of inline dimensions and if i used Aggr then then I think I would need to use Pick(Dimensionality(), expr1, expr2...)&lt;/P&gt;&lt;P&gt;which will lead to lots of coding in many places where the max function is used and also performance reduction. So is there any other solution for this?&lt;IMG alt="New.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125504_New.JPG" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2016 04:43:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-05-24T04:43:08Z</dc:date>
    <item>
      <title>Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130249#M371549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the attached application. Where max(sales) or max with any field is used the subtotals and totals are just the max values of each dimension and not total of all dimension values. Sum() calculates properly but this is just a sample app and in my application I have to use max function. I also used aggr with max and that solved the problem but as I said this is just a sample app. In the actual app there are lots of inline dimensions and if i used Aggr then then I think I would need to use Pick(Dimensionality(), expr1, expr2...)&lt;/P&gt;&lt;P&gt;which will lead to lots of coding in many places where the max function is used and also performance reduction. So is there any other solution for this?&lt;IMG alt="New.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125504_New.JPG" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 04:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130249#M371549</guid>
      <dc:creator />
      <dc:date>2016-05-24T04:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130250#M371550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamme&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;d,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your question is bit confusing.Can you please tell what exactly you want in the subtotals.&lt;/P&gt;&lt;P&gt;You need Max value among the expanded rows or you need the sum of all the max values in the expanded rows.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 07:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130250#M371550</guid>
      <dc:creator>chetansehgal</dc:creator>
      <dc:date>2016-05-24T07:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130251#M371551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't of think Aggr() as a "work around" - it is the regular way to calculate "sum of rows total" for the totals in a pivot table, rather than the default "expression total".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;...&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I think I would need to use Pick(Dimensionality(), expr1, expr2...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you think that. The Aggr() function needs to include &lt;EM&gt;all&lt;/EM&gt; the chart dimensions. No conditional is necessary for the different subtotal levels.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 07:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130251#M371551</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-24T07:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130252#M371552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Please find the attached file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 08:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130252#M371552</guid>
      <dc:creator>maniram23</dc:creator>
      <dc:date>2016-05-24T08:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130253#M371553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for trying out. But you see that is what is happening. See the overall totals in the last row is not the same as &lt;/P&gt;&lt;P&gt;sum(Sales), aggr(Expr.). I want the overall totals to be the same in case of max function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 08:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130253#M371553</guid>
      <dc:creator />
      <dc:date>2016-05-24T08:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130254#M371554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh you are right, if I use the aggr() function with all dimensions then the results stays the same as sum().&lt;/P&gt;&lt;P&gt;I thought of using Pick(Dimensionality() ) because I was under the notion that if I collapsed some dimensions then the aggr(max()) would give me incorrect results again but it doesn't. I am a newbie (2.5 months to be accurate) to Qlikview and still learning. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt; Thank you I will try the aggr expression with all dimensions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 08:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130254#M371554</guid>
      <dc:creator />
      <dc:date>2016-05-24T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130255#M371555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually the max function is applied over a field at the backend, its not related to front end although I can't tell you exactly since I am just studying the app and helping in some minor changes.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 08:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130255#M371555</guid>
      <dc:creator />
      <dc:date>2016-05-24T08:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max function causing inaccurate totals in pivot/straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130256#M371556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Pick(Dimensionality()+1, Sum(Sales), Sum(Sales), Max(Sales))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Dimensionality() &amp;lt; 2, Sum(Sales), Max(Sales))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 11:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-causing-inaccurate-totals-in-pivot-straight-table/m-p/1130256#M371556</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-24T11:20:20Z</dc:date>
    </item>
  </channel>
</rss>

