<?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 Distinct Values with Aggr function and set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-Values-with-Aggr-function-and-set-analysis/m-p/174771#M503641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to report on the number of jobs per week above our abandon rate. The data I have has several rows per job, so I need to calculate the sum of abandon / sum of calls, work out which are above the abandon rate target, and then count the distinct jobs that result.&lt;/P&gt;&lt;P&gt;I'll attach in a moment some sample data and a couple of the attempts that I had tried.&lt;/P&gt;&lt;P&gt;I would appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 23:53:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-03T23:53:58Z</dc:date>
    <item>
      <title>Distinct Values with Aggr function and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Values-with-Aggr-function-and-set-analysis/m-p/174771#M503641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to report on the number of jobs per week above our abandon rate. The data I have has several rows per job, so I need to calculate the sum of abandon / sum of calls, work out which are above the abandon rate target, and then count the distinct jobs that result.&lt;/P&gt;&lt;P&gt;I'll attach in a moment some sample data and a couple of the attempts that I had tried.&lt;/P&gt;&lt;P&gt;I would appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 23:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Values-with-Aggr-function-and-set-analysis/m-p/174771#M503641</guid>
      <dc:creator />
      <dc:date>2009-12-03T23:53:58Z</dc:date>
    </item>
    <item>
      <title>Distinct Values with Aggr function and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Values-with-Aggr-function-and-set-analysis/m-p/174772#M503642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're close, but the &lt;EM&gt;aggr&lt;/EM&gt; function is slightly off. This is the expression in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(sum(AGGR(sum(Abandon) / (sum(Calls)), JobNumber))&amp;gt;0.02,JobNumber)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The way this is written, you are taking the sum of the abandon rate for &lt;STRONG&gt;all&lt;/STRONG&gt; jobs and then asking for a job number to be returned. What you are wanting to do is have the &lt;EM&gt;if&lt;/EM&gt; challenged and answered before the &lt;EM&gt;aggr&lt;/EM&gt; resolves like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;count(AGGR(If(sum(Abandon) / sum(Calls) &amp;gt; .02, JobNumber), JobNumber))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In this, the &lt;EM&gt;if&lt;/EM&gt; is being evaluated for each JobNumber and returning the JobNumber. Then a &lt;EM&gt;count&lt;/EM&gt; function is used against the returned array of job numbers.&lt;/P&gt;&lt;P&gt;The result is a count of jobs exceeding abandon rate. Similarly, you could use &lt;EM&gt;concat&lt;/EM&gt; instead of &lt;EM&gt;count&lt;/EM&gt; and get a list of the jobs specifically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2009 00:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Values-with-Aggr-function-and-set-analysis/m-p/174772#M503642</guid>
      <dc:creator />
      <dc:date>2009-12-04T00:20:51Z</dc:date>
    </item>
  </channel>
</rss>

