<?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 Ignoring fields in sum aggr does not work (chart) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919200#M75604</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I'm just trying to do a very simple thing: I need to count the sum of the values so that the filter for some fields is ignored. At the same time, I use aggregation of the sum across several fields.&lt;/P&gt;
&lt;P&gt;However, qlik sense ignores this condition and in any case the amount changes when there are fields in the filter that are not specified in the formula.&lt;/P&gt;
&lt;P&gt;Data sample:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;partner&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;campaign&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;adGroup&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;spent_eur&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;p2&lt;/TD&gt;
&lt;TD&gt;c4&lt;/TD&gt;
&lt;TD&gt;ad4&lt;/TD&gt;
&lt;TD&gt;keyword2&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's assume I'm filtering &lt;STRONG&gt;p1&lt;/STRONG&gt; and &lt;STRONG&gt;keyword2.&amp;nbsp;&lt;/STRONG&gt;What qlik sense should show me: &lt;STRONG&gt;18&lt;/STRONG&gt; (15+3) -&amp;gt;&amp;nbsp;(I want to ignore the keyword filter)&lt;/P&gt;
&lt;P&gt;What is it really showing me: &lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;The formula I use (one of the many options I've tried):&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;SUM(AGGR(SUM({1 &amp;lt;partner=P(partner_name), campaign=P(campaign), adGroup=P(adGroup), m_date= {"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}, keyword=&amp;gt;}&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;spent_eur), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;partner, campaign, adGroup, m_date))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I also tried adding &lt;FONT face="courier new,courier" color="#339966"&gt;total&lt;/FONT&gt; before &lt;FONT face="courier new,courier" color="#339966"&gt;distinct&lt;/FONT&gt; or after it, but then the value even without the filter becomes incorrect, it's some random incorrect number.&lt;/P&gt;
&lt;P&gt;Thanks for any tips&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2022 06:30:45 GMT</pubDate>
    <dc:creator>ZimaBlue</dc:creator>
    <dc:date>2022-04-18T06:30:45Z</dc:date>
    <item>
      <title>Ignoring fields in sum aggr does not work (chart)</title>
      <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919200#M75604</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I'm just trying to do a very simple thing: I need to count the sum of the values so that the filter for some fields is ignored. At the same time, I use aggregation of the sum across several fields.&lt;/P&gt;
&lt;P&gt;However, qlik sense ignores this condition and in any case the amount changes when there are fields in the filter that are not specified in the formula.&lt;/P&gt;
&lt;P&gt;Data sample:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;partner&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;campaign&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;adGroup&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;spent_eur&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;p3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;c3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;ad3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;keyword3&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;p2&lt;/TD&gt;
&lt;TD&gt;c4&lt;/TD&gt;
&lt;TD&gt;ad4&lt;/TD&gt;
&lt;TD&gt;keyword2&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's assume I'm filtering &lt;STRONG&gt;p1&lt;/STRONG&gt; and &lt;STRONG&gt;keyword2.&amp;nbsp;&lt;/STRONG&gt;What qlik sense should show me: &lt;STRONG&gt;18&lt;/STRONG&gt; (15+3) -&amp;gt;&amp;nbsp;(I want to ignore the keyword filter)&lt;/P&gt;
&lt;P&gt;What is it really showing me: &lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;The formula I use (one of the many options I've tried):&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;SUM(AGGR(SUM({1 &amp;lt;partner=P(partner_name), campaign=P(campaign), adGroup=P(adGroup), m_date= {"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}, keyword=&amp;gt;}&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;spent_eur), &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;partner, campaign, adGroup, m_date))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I also tried adding &lt;FONT face="courier new,courier" color="#339966"&gt;total&lt;/FONT&gt; before &lt;FONT face="courier new,courier" color="#339966"&gt;distinct&lt;/FONT&gt; or after it, but then the value even without the filter becomes incorrect, it's some random incorrect number.&lt;/P&gt;
&lt;P&gt;Thanks for any tips&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 06:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919200#M75604</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-04-18T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring fields in sum aggr does not work (chart)</title>
      <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919204#M75605</link>
      <description>&lt;P&gt;to ignore a filter in a particular field just leave the right side of equal sign empty, aggr() is not needed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;SUM({&amp;lt;keyword=,m_date= {"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;}&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;spent_eur)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 06:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919204#M75605</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-04-18T06:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring fields in sum aggr does not work (chart)</title>
      <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919208#M75606</link>
      <description>&lt;P&gt;I use aggr for other purposes, unfortunately I can't give it up.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 06:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919208#M75606</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-04-18T06:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring fields in sum aggr does not work (chart)</title>
      <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919216#M75610</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;Try below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;&lt;STRONG&gt;SUM({&amp;lt;keyword=&amp;gt;}&lt;/STRONG&gt; AGGR(SUM({&amp;lt;keyword=,- m_date= {"&amp;gt;=$(vDateFrom)&amp;lt;=$(vDateTo)"}&amp;gt;}&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;spent_eur),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;partner, campaign, adGroup, m_date))&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 07:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919216#M75610</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-04-18T07:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring fields in sum aggr does not work (chart)</title>
      <link>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919221#M75611</link>
      <description>&lt;P&gt;It looks like it's working brilliantly! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 07:14:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignoring-fields-in-sum-aggr-does-not-work-chart/m-p/1919221#M75611</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-04-18T07:14:04Z</dc:date>
    </item>
  </channel>
</rss>

