<?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: Aggr function problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211124#M388467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that your solution will take in consideration just the Agents, is this correct? I would need to check the values for the combination between Agent and Dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Oct 2016 14:08:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-22T14:08:56Z</dc:date>
    <item>
      <title>Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211120#M388463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with the Aggr function and i hope someone can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I am trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the amount of agents that achieve more less than 6 calls per day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the formula I am using without luck:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct aggr(if(sum(Inbound)+sum(Outbound)&amp;lt;6,Agent,Dates),Agent&amp;amp;Dates)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is a sampel of my data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Agent&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Inbound&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Outbound&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;01/01/2001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;01/02/2001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;01/02/2001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;01/01/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;01/0122011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agent Date inbound outbound&lt;/P&gt;&lt;P&gt;1 01/01/2001 4 6&lt;/P&gt;&lt;P&gt;2 01/02/2011 3 3&lt;/P&gt;&lt;P&gt;2 01/02/2011 5 4&lt;/P&gt;&lt;P&gt;3 01/01/2001 7 7&lt;/P&gt;&lt;P&gt;3 01/02/2011 5 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to use set analysis but nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyone that can help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 08:56:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211120#M388463</guid>
      <dc:creator />
      <dc:date>2016-10-22T08:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211121#M388464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum(Inbound)+sum(Outbound)&amp;lt;6, 1, 0), Agent,Dates))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 13:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211121#M388464</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-10-22T13:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211122#M388465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus, thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code seems to work a lot better but it gives me the wrong result ( I was expecting a result of 195 and it gives me 196 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain me how your approach works?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 13:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211122#M388465</guid>
      <dc:creator />
      <dc:date>2016-10-22T13:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211123#M388466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;Agent = {"=Sum(Inbound) + Sum(Outbound) &amp;lt; 6&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;"}&amp;gt;} Agent)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 14:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211123#M388466</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-22T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211124#M388467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that your solution will take in consideration just the Agents, is this correct? I would need to check the values for the combination between Agent and Dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 14:08:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211124#M388467</guid>
      <dc:creator />
      <dc:date>2016-10-22T14:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211125#M388468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggested approach with the aggr-function will create a (virtual) table with Agent and Dates as dimension and a result-column of the condition within the if-loop - if(condition, true, false) - which will be then simply aggregated through the outer sum-function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To find the difference between the expression and your expected result create a tablebox of Agent, Dates, Inbound and Outbound and a unique record-identifier - if no one exists you could create one within the script with rowno() - and then checking your data directly. There might be a duplicate record or another issue with the data-quality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 05:05:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211125#M388468</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-10-24T05:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function problem</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211126#M388469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not entirely sure what you are looking to do, but have you tried this expression? Is it not working the way you would expect?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 05:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-problem/m-p/1211126#M388469</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T05:43:56Z</dc:date>
    </item>
  </channel>
</rss>

