<?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: Pivot Partial Sums Behavior in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292823#M108659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; John - Well I bit the bullet and spent the entire day doing the right thing, recreating all of my crazy calculated dimensions into the data model.&amp;nbsp; Got that working.&amp;nbsp; So then I took your first suggestion and used the sum(aggr( trick so the QV evulates the expression it does a sum of rows.&amp;nbsp; I can get your example to work when I use a max() function but for some reason it's not working when I do a sum().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I see this working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(max(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;But not this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(sum(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;In my scenario I am forced to use SET analysis with the embedded sum.&amp;nbsp; I am passing every dimension field.&amp;nbsp; Data is returning but again for some reason the partial sum is still just evaluating the partial sum row.&amp;nbsp; Any suggestions?&amp;nbsp; Have a good weekend&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2011 22:30:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-17T22:30:24Z</dc:date>
    <item>
      <title>Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292819#M108655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a Pivot Table, on your partial sums line, can you force Qlikview to simply sum the rows it is grouped on INSTEAD of the default behavior of calculating the sum based on aggregation rules.&amp;nbsp; For example see the attached file (would embed it into this post but keep on getting error).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See how the partial sum line shows $996.88 for last three rows?&amp;nbsp; Even though you can see that the last two rows have different numbers.&amp;nbsp; It's because QV is calculating the partial sum based on the partial sum totals NOT simply adding the total of each of those columns individually.&amp;nbsp; Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done in a Pivot Table?&amp;nbsp; I'm sure it might involve some weird trick like adding a row for 'Total' in your data but not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 23:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292819#M108655</guid>
      <dc:creator />
      <dc:date>2011-06-15T23:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292820#M108656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a pivot table, QlikView always applies your expression and never does a sum of rows.&amp;nbsp; But you're right that there's a weird trick to make it work.&amp;nbsp; You can set up your expression so that when evaluated as a total, the expression itself does a sum of rows.&amp;nbsp; The basic form of the expression is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(YourCurrentExpressionHere,Your,Chart,Dimensions,Here))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if your chart looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 1 = Customer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 2 = Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression&amp;nbsp; = max(OrderSize)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then to get the partial sum to behave as a sum of rows, change your expression to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(max(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 23:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292820#M108656</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-15T23:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292821#M108657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; John thanks again for helping out.&amp;nbsp; Makes sense but unfortunetely I have some gnarly calculated dimensions in my chart dimension set.&amp;nbsp; In the aggr() function you only call fields right (I couldn't reproduce my gnarly functions ... even if I did it would be a performance nightmare).&amp;nbsp; Nor can I call the calculated dimensions using their label names ...&amp;nbsp; Any suggestions?&amp;nbsp; I hope creating my gnarly dimensions in the load script isn't my only option.T&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>Thu, 16 Jun 2011 14:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292821#M108657</guid>
      <dc:creator />
      <dc:date>2011-06-16T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292822#M108658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, yeah, it won't work with calculated dimensions.&amp;nbsp; Yet another reason I try to avoid calculated dimensions where at all possible.&amp;nbsp; I really do suggest creating your gnarly dimensions in the load script instead of in the chart if at all possible.&amp;nbsp; It will significantly boost chart performance (not that I know you have a performance problem to fix) and also solves the sum of rows problem.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be another way to solve it with calculated dimensions, and as a hint you could check dimensionality() with an if() to put a completely different calculation on the total row, but I'm not thinking of what expression you could put there that would work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 16:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292822#M108658</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-16T16:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292823#M108659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; John - Well I bit the bullet and spent the entire day doing the right thing, recreating all of my crazy calculated dimensions into the data model.&amp;nbsp; Got that working.&amp;nbsp; So then I took your first suggestion and used the sum(aggr( trick so the QV evulates the expression it does a sum of rows.&amp;nbsp; I can get your example to work when I use a max() function but for some reason it's not working when I do a sum().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I see this working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(max(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;But not this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(sum(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;In my scenario I am forced to use SET analysis with the embedded sum.&amp;nbsp; I am passing every dimension field.&amp;nbsp; Data is returning but again for some reason the partial sum is still just evaluating the partial sum row.&amp;nbsp; Any suggestions?&amp;nbsp; Have a good weekend&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 22:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292823#M108659</guid>
      <dc:creator />
      <dc:date>2011-06-17T22:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292824#M108660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming your chart has dimensions Customer and Product, then this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(sum(OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is equivalent to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(OrderSize)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no difference here between doing a sum of rows and doing a sum of all order sizes.&amp;nbsp; Hopefully your real example is more complicated and has a reason to need sum of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A possible issue is the set analysis.&amp;nbsp; For a set like {&amp;lt;Supplier={'Bob'}&amp;gt;}, you have to apply the same set to both aggregations for it to work properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;Supplier={'Bob'}&amp;gt;} aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;max({&amp;lt;Supplier={'Bob'}&amp;gt;} OrderSize),Customer,Product))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 23:07:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292824#M108660</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-17T23:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292825#M108661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/2226"&gt;John Witherspoon&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your statement that sum(aggr(sum is the same as sum( is only correct if the summed field, and aggr conditions are on the same table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an instance of exactly this issue where I am summing a field on the 'members' table based on when their purchase happened. If I AGGR by month (of the sale), it's possible that I get a member in multiple months making purchases, so they would count/sum multiple times. By re-writing my calculations as a SUM(AGGR(SUM( I do get a total of rows in my pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the solution! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 19:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292825#M108661</guid>
      <dc:creator />
      <dc:date>2014-05-15T19:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292826#M108662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to get this principle to work and I am not getting there...&lt;/P&gt;&lt;P&gt;here is my set analysis up to now, but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;(sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.VAL_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date_calcul&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_NO&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;$(vR_PAI_00230_PORT_NO)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.MKT_VALUE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.CUSIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&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;({1&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.VAL_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date_calcul&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_NO&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;$(vR_PAI_00230_PORT_NO)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.ACCRUAL_AMMOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.CUSIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&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;({1&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.VAL_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date_calcul&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_NO&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;$(vR_PAI_00230_PORT_NO)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.MKT_VALUE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.CUSIP&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;({1&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.VAL_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date_calcul&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_NO&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;$(vR_PAI_00230_PORT_NO)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.ACCRUAL_AMMOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.CUSIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) )&lt;BR /&gt;&lt;BR /&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;({1&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.VAL_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date_calcul&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_NO&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;$(vR_PAI_00230_PORT_NO)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.RANK&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VAL_RPT.CUSIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) )&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;So I am adding, mkt_values to accrual ammounts, getting the total for the same addition, to get a %, then multiplying by the RANK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I'm almost abandonning and using a value calculating by script...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 15:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292826#M108662</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2014-12-07T15:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Partial Sums Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292827#M108663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble understanding what your aggr() functions are doing. AGGR evaluates an expression based on a dimension. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I would expect:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff; background-color: #f6f6f6;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;(SUM(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; background-color: #f6f6f6;"&gt;VAL_RPT.ACCRUAL_AMMOUNT)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; background-color: #f6f6f6;"&gt;VAL_RPT.PORT_CODE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; background-color: #f6f6f6;"&gt;VAL_RPT.CUSIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;I'm not sure if that's going to totally solve your issue though, but as i see it, your aggr functions are meaningless. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 19:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Partial-Sums-Behavior/m-p/292827#M108663</guid>
      <dc:creator />
      <dc:date>2014-12-19T19:21:43Z</dc:date>
    </item>
  </channel>
</rss>

