<?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: Subtotal Incorrect in Pivot Table with Aggr Condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782056#M60867</link>
    <description>&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If(Count(Distinct[ACTIVITIES]) &amp;lt;&amp;nbsp;Sum(Aggr(sum(STAFF), [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(Aggr(100, [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[DATE],[COMPANY],[SITE]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 16:38:19 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2021-02-11T16:38:19Z</dc:date>
    <item>
      <title>Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1781672#M60827</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm having a problem with the subtotal value of my Pivot Table. I'm trying to dynamically assign a value depending on a condition for Dimension 2 and to have the sum of these values for Dimension 1.&lt;/P&gt;&lt;P&gt;Here are the parameters of the table :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dimension 1 :&amp;nbsp;&lt;/STRONG&gt;COMPANY&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dimension 2 : &lt;/STRONG&gt;SITE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Column : &lt;/STRONG&gt;DATE&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Measure :&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If(Count(Distinct[ACTIVITIES]) &amp;lt;&amp;nbsp;Sum(Aggr(sum(STAFF), [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(Aggr(100, [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;So it is working fine for the SITE level (NANTES, SAINT ELOI...) but not for the COMPANY level... The sum does not correspond to the SITE level (100 + 100 = 200).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kcollorig_0-1612967900954.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48856iC46DCC5ABA02619F/image-size/large?v=v2&amp;amp;px=999" role="button" title="kcollorig_0-1612967900954.png" alt="kcollorig_0-1612967900954.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1781672#M60827</guid>
      <dc:creator>kcollorig</dc:creator>
      <dc:date>2024-11-16T00:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782021#M60859</link>
      <description>&lt;P&gt;A little up because I'm sure we are close to find the solution... But need your help for this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782021#M60859</guid>
      <dc:creator>kcollorig</dc:creator>
      <dc:date>2021-02-11T14:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782056#M60867</link>
      <description>&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If(Count(Distinct[ACTIVITIES]) &amp;lt;&amp;nbsp;Sum(Aggr(sum(STAFF), [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(Aggr(100, [DATE],[COMPANY],[SITE])),&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[DATE],[COMPANY],[SITE]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782056#M60867</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-02-11T16:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782064#M60868</link>
      <description>&lt;P&gt;Thanks for your answer!&lt;/P&gt;&lt;P&gt;Yeah I thought on doing this but unfortunately it doesn't work... Everything is then set to 0...&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 17:04:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782064#M60868</guid>
      <dc:creator>kcollorig</dc:creator>
      <dc:date>2021-02-11T17:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782145#M60871</link>
      <description>&lt;P&gt;It may be an issue related to the data model. Do you have duplication of sites values there?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 21:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782145#M60871</guid>
      <dc:creator>sonkumamon</dc:creator>
      <dc:date>2021-02-11T21:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal Incorrect in Pivot Table with Aggr Condition</title>
      <link>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782222#M60882</link>
      <description>&lt;P&gt;Quite often worked this kind of aggregating the results of the inner calculation on their row-level because the set conditions couldn't be applied/fulfilled on the higher TOTAL levels respectively return there other results. But your expression looks a bit uncommon and therefore I suggest to review your object-calculation in regard with the datamodel.&lt;/P&gt;&lt;P&gt;Nevertheless it could be that you need different expressions on the different dimension-levels of your pivot. This could be reached with something like:&lt;/P&gt;&lt;P&gt;if(dimensionality() &amp;lt; 1, expr1, expr2)&lt;/P&gt;&lt;P&gt;To see which row has which level put&amp;nbsp;dimensionality() directly as an expression in your object.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Subtotal-Incorrect-in-Pivot-Table-with-Aggr-Condition/m-p/1782222#M60882</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-02-12T08:52:23Z</dc:date>
    </item>
  </channel>
</rss>

