<?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: Problem with the aggr sum in the pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942588#M77656</link>
    <description>&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;add the actual dimension field in Aggr()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;=SUM({1&amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;} AGGR(SUM({1 &amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;DISTINCT spent),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;exp_aggr_field, &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;Keyword&lt;/STRONG&gt;&lt;/FONT&gt;))&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 04:25:02 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2022-06-13T04:25:02Z</dc:date>
    <item>
      <title>Problem with the aggr sum in the pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942401#M77624</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I use measure formula in the pivot table and i get problem each time (tried three different data loading logic).&lt;/P&gt;
&lt;P&gt;I will try to give a simplified example here.&amp;nbsp;My pivot table looks like this.&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;keyword (dimension)&lt;/TD&gt;
&lt;TD width="50%"&gt;expenditure (measure)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;key1&lt;/TD&gt;
&lt;TD width="50%"&gt;1000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;key2&lt;/TD&gt;
&lt;TD width="50%"&gt;5000&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Where the measure column is the following formula:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;SUM({1&amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;} AGGR(SUM({1 &amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}, keyword=P(keyword)&amp;gt;} &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;DISTINCT spent), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;exp_aggr_field))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Since there are duplicate rows in the original data array, i created a field for aggregation 'exp_aggr_field', which consists 'date-partner-keyword'. I use this field to calculate the amount of expenses.&lt;/P&gt;
&lt;P&gt;When I look at the data array and manually match the rows, then I get the value &lt;FONT color="#3366FF"&gt;3000&lt;/FONT&gt; for &lt;FONT color="#3366FF"&gt;key1&lt;/FONT&gt;. I am reliably aware that this is the correct value and the data array looks correct&lt;/P&gt;
&lt;P&gt;In the pivot table, I see a value &lt;FONT color="#3366FF"&gt;1000&lt;/FONT&gt; if no filters are applied. If apply a filter on a dimension from the pivot table (keyword), the value turns into &lt;FONT color="#3366FF"&gt;3000&lt;/FONT&gt; - correct. Problem occurs only for some rows. Is this a pivot bug of the old version of qliksense (our company uses the 2017 version) or is there something wrong with the logic of the formula?&amp;nbsp;In that case, why doesn't it work only for some rows?&lt;/P&gt;
&lt;P&gt;I want to get the same value for the keyword row, regardless of whether filters are applied or not.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any tips!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 21:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942401#M77624</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-06-10T21:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the aggr sum in the pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942452#M77633</link>
      <description>&lt;P&gt;the problem isnt very clear, maybe you would want to post sample data and the expected result.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 15:16:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942452#M77633</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-06-11T15:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the aggr sum in the pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942588#M77656</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;add the actual dimension field in Aggr()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;=SUM({1&amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;} AGGR(SUM({1 &amp;lt;exp_date={"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;DISTINCT spent),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;exp_aggr_field, &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;Keyword&lt;/STRONG&gt;&lt;/FONT&gt;))&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 04:25:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1942588#M77656</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-06-13T04:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the aggr sum in the pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1943366#M77736</link>
      <description>&lt;P&gt;it turned out to be so easy, thank you&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 12:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-the-aggr-sum-in-the-pivot-table/m-p/1943366#M77736</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-06-14T12:29:42Z</dc:date>
    </item>
  </channel>
</rss>

