<?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: Using Count Distinct and Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323290#M834400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jun 2017 15:17:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-07T15:17:09Z</dc:date>
    <item>
      <title>Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323284#M834394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to understand the answers for this question that have been posted previously but I am having trouble applying it.&lt;/P&gt;&lt;P&gt;Here is my dilemma. I would like to count distinct the engineers on a project and the sum the hours they have worked divided by 2080 (FTE). This would show up as a KPI. Basically a Productivity Matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Engineers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual Hours&lt;/P&gt;&lt;P&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;James&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 600&lt;/P&gt;&lt;P&gt;mike&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P&gt;john&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 400&lt;/P&gt;&lt;P&gt;James&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I would like to get when I filter by engineer.&lt;/P&gt;&lt;P&gt;Total Engineers = 100%&lt;/P&gt;&lt;P&gt;John&amp;nbsp; = 24%&lt;/P&gt;&lt;P&gt;James = 33.6%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what I have used - sum(aggr(sum(DISTINCT [Engineer]),[Actual Hours]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323284#M834394</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323285#M834395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: maroon;"&gt;[Actual Hours]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;)/2080 &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 21:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323285#M834395</guid>
      <dc:creator>el_aprendiz111</dc:creator>
      <dc:date>2017-06-06T21:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323286#M834396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sounds like you really want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum([Actual Hours])/sum(TOTAL [Actual Hours])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 21:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323286#M834396</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-06T21:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323287#M834397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand you correctly, it can be as in an attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 07:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323287#M834397</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-06-07T07:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323288#M834398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just incase , you might want to ignore filters on the denominator add &lt;STRONG&gt;{1}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum([Actual Hours])/sum(&lt;SPAN style="color: #800000; font-size: 14pt;"&gt; {1}&lt;/SPAN&gt; TOTAL [Actual Hours])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 07:32:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323288#M834398</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-06-07T07:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323289#M834399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help, but this is what I am looking for, (My script writing it not the best)&lt;/P&gt;&lt;P&gt;sum(Count(distinct[Engineers],[Actual Hours])/2080&lt;/P&gt;&lt;P&gt;Basically:&lt;/P&gt;&lt;P&gt;John total hours a year he can work is 2080&lt;/P&gt;&lt;P&gt;He only worked 500 but they are spread out in 2 instances i.e. 100 and 400&lt;/P&gt;&lt;P&gt;How do I count one instance of John and sum the number of hours he worked.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 14:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323289#M834399</guid>
      <dc:creator />
      <dc:date>2017-06-07T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323290#M834400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 15:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323290#M834400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-07T15:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323291#M834401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You were close with your first attempt, but try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum([Actual Hours])/2080,Engineers)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 15:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323291#M834401</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2017-06-07T15:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Count Distinct and Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323292#M834404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. This Worked!!&lt;/P&gt;&lt;P&gt;Thanks also to everyone to jumped in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 17:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Count-Distinct-and-Sum/m-p/1323292#M834404</guid>
      <dc:creator />
      <dc:date>2017-06-07T17:20:04Z</dc:date>
    </item>
  </channel>
</rss>

