<?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: Table / Pivot table sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729882#M1055912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think we are moving away from the original reason for this post, but the reason those two sum(aggr()) expressions are behaving that way is that the selection is being applied to the outer sum. You could override the selection on the outer sum in the same way as the inner sum:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Séria ={'01. Orientacný plán'}&amp;gt;} aggr(sum({$&amp;lt;Séria ={'01. Orientacný plán'}&amp;gt;}Ciastka),CISLOSTAVBY,Projekt,nazevob,Názov,Kód,Obdobie,Rok,Stav, Séria))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the list of dimensions in the aggr must include all the dimensions in the chart - its not clear whether that is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2014 11:27:03 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-10-15T11:27:03Z</dc:date>
    <item>
      <title>Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729876#M1055906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table like this, total mode is set to "Expression Total":&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snap_2014.10.15 11.35.32_001.png" class="jive-image" src="/legacyfs/online/68963_Snap_2014.10.15 11.35.32_001.png" style="width: 620px; height: 196px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see (or calculate), the total value isn't correct, the correct value is -10 146,37.&lt;/P&gt;&lt;P&gt;The difference is exact 2,29, that means, that the "Expression Total" setting causes "distinct sum", e.g. the doubled value 2,29 is summed only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can repair this behaviour by total mode setting to "Sum of Rows":&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snap_2014.10.15 11.41.28_002.png" class="jive-image" src="/legacyfs/online/68965_Snap_2014.10.15 11.41.28_002.png" style="width: 620px; height: 200px;" /&gt;&lt;/P&gt;&lt;P&gt;Until now OK &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in another pivot table I'm using a calculated dimension ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Séria ={'08. Účtovníctvo'}&amp;gt;}Čiastka)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and the result is afflicted by missing of such doubled values.&lt;/P&gt;&lt;P&gt;The bad thing is, that in the pivot table I'm not able to set the total mode to "Sum of rows" &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 09:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729876#M1055906</guid>
      <dc:creator />
      <dc:date>2014-10-15T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729877#M1055907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that the expression total is wrong? Normally, its the more correct of the two and it does not distinct the values unless that is in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the expression is simply Sum(Ciastka), then I think that the 2.29 is genuinely duplicated and your table and the sum of rows is double counting it. Perhaps on of the the dimensions is not properly associated with the fact table causing the value to appear twice. You will need to validate the numbers against the source data to verify this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 10:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729877#M1055907</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-10-15T10:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729878#M1055908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Johanthan&lt;/P&gt;&lt;P&gt;thank you for you answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The double value -2,29 is correct (it comes from the underlying dataset) and I want it to be summed.&lt;/P&gt;&lt;P&gt;As you can see, there is a difference between this two records in field "nazevob"&lt;IMG alt="Snap_2014.10.15 12.09.21_003.png" class="jive-image" src="/legacyfs/online/68966_Snap_2014.10.15 12.09.21_003.png" style="width: 620px; height: 199px;" /&gt;&lt;/P&gt;&lt;P&gt;Any suggestions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 10:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729878#M1055908</guid>
      <dc:creator />
      <dc:date>2014-10-15T10:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729879#M1055909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dusan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use the rowno() function in the Script when you are loading the Fact Data.&lt;/P&gt;&lt;P&gt;Load *,Rowno() as RecordNo &lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;It will helps you easy to find out the duplicate records and Also helps you the get the correct Sum() of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt; Sovan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 10:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729879#M1055909</guid>
      <dc:creator />
      <dc:date>2014-10-15T10:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729880#M1055910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Čiastka),Dimension1,Dimension2,Dimension3,Dimension4,Dimension5,Dimension6,Dimension7,Dimension8,Dimension9))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 10:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729880#M1055910</guid>
      <dc:creator>preminqlik</dc:creator>
      <dc:date>2014-10-15T10:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729881#M1055911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Prem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for you answer.&lt;/P&gt;&lt;P&gt;The sum(aggr(sum(Čiastka), Dimensions .....) I already tried, but this doesn't work correct for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets me explain the situation a little bit more detailed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pivot table in fact looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snap_2014.10.15 12.54.50_004.png" class="jive-image" src="/legacyfs/online/68967_Snap_2014.10.15 12.54.50_004.png" style="width: 620px; height: 255px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see, I have two calculated expressions:&lt;/P&gt;&lt;P&gt;01. Orientačný plán = sum({$&amp;lt;Séria ={'01. Orientačný plán'}&amp;gt;}Čiastka)&lt;/P&gt;&lt;P&gt;08. Účtovníctvo = sum({$&amp;lt;Séria ={'08. Účtovníctvo'}&amp;gt;}Čiastka)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They sum values "Čiastka" from the whole dataset according to current selection ($) and where the value in field Séria equals '01. Orientačný plán' or '08. Účtovníctvo'. &lt;/P&gt;&lt;P&gt;As you can see, there are some values in BOTH columns of the pivot table - and that's I want.&lt;/P&gt;&lt;P&gt;(With exception, that the sum's don't contain anyhow duplicated values - that's the discussed problem.)&lt;/P&gt;&lt;P&gt;And, that's important, THE RESULTS ARE INDEPENDENT FROM THE CURRENT SELECTION IN FIELD "Séria" !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I extend my expressions this way ...&lt;/P&gt;&lt;P&gt;01. Orientačný plán = &lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;sum({$&amp;lt;Séria ={'01. Orientačný plán'}&amp;gt;}Čiastka),&lt;STRONG&gt;CISLOSTAVBY,Projekt,nazevob,Názov,Kód,Obdobie,Rok,Stav, Séria)&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;08. Účtovníctvo = &lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;sum({$&amp;lt;Séria ={'08. Účtovníctvo'}&amp;gt;}Čiastka),&lt;STRONG&gt;CISLOSTAVBY,Projekt,nazevob,Názov,Kód,Obdobie,Rok,Stav,Séria&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...summed data are correct (doubled values are included), but the columns contain data ONLY in the apropriate column according to selection is field "Séria":-(&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snap_2014.10.15 13.09.03_005.png" class="jive-image" src="/legacyfs/online/68968_Snap_2014.10.15 13.09.03_005.png" style="width: 620px; height: 278px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Snap_2014.10.15 13.12.36_006.png" class="jive-image" src="/legacyfs/online/68969_Snap_2014.10.15 13.12.36_006.png" style="width: 620px; height: 257px;" /&gt;&lt;/P&gt;&lt;P&gt;And this is useless form me, because the goal of my pivot table is to compare values in both columns &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 11:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729881#M1055911</guid>
      <dc:creator />
      <dc:date>2014-10-15T11:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729882#M1055912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think we are moving away from the original reason for this post, but the reason those two sum(aggr()) expressions are behaving that way is that the selection is being applied to the outer sum. You could override the selection on the outer sum in the same way as the inner sum:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Séria ={'01. Orientacný plán'}&amp;gt;} aggr(sum({$&amp;lt;Séria ={'01. Orientacný plán'}&amp;gt;}Ciastka),CISLOSTAVBY,Projekt,nazevob,Názov,Kód,Obdobie,Rok,Stav, Séria))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the list of dimensions in the aggr must include all the dimensions in the chart - its not clear whether that is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 11:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729882#M1055912</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-10-15T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Table / Pivot table sum</title>
      <link>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729883#M1055914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are the winner !!! It works !!!&lt;/P&gt;&lt;P&gt;Thank you very much !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I must admit, that I can't really understand, how your statement works :-(((&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 11:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-Pivot-table-sum/m-p/729883#M1055914</guid>
      <dc:creator />
      <dc:date>2014-10-15T11:37:42Z</dc:date>
    </item>
  </channel>
</rss>

