<?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: How we can use both Distinct and sum functions in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850146#M1014608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand what you mean with " i need to take the distinct values of the field &lt;STRONG&gt;Number &lt;/STRONG&gt;before taking the Sum".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain this with some lines of sample data and your expected outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2015 15:22:30 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-04-16T15:22:30Z</dc:date>
    <item>
      <title>How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850145#M1014606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How we can use both Distinct and sum functions in set analysis?&lt;/P&gt;&lt;P&gt;See the below expression where i need to take the distinct values of the field &lt;STRONG&gt;Number &lt;/STRONG&gt;before taking the Sum of &lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Distinct(Number),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AAAAA={'C'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;gt;}Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850145#M1014606</guid>
      <dc:creator />
      <dc:date>2015-04-16T13:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850146#M1014608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand what you mean with " i need to take the distinct values of the field &lt;STRONG&gt;Number &lt;/STRONG&gt;before taking the Sum".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain this with some lines of sample data and your expected outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 15:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850146#M1014608</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-04-16T15:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850147#M1014610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt; sum({$&amp;lt;Number= {'=COUNT(DISTINCT Number)'},AAAAA={'C'}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 15:33:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850147#M1014610</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-04-16T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850148#M1014612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah Sure,&lt;/P&gt;&lt;P&gt;See the below example &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Test1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83909_Test1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;here i want the result as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Test2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/83910_Test2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can see like we are taking the distinct of Test1 and after that i want to sum the field Test3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 15:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850148#M1014612</guid>
      <dc:creator />
      <dc:date>2015-04-16T15:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850149#M1014613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, Its not working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 15:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850149#M1014613</guid>
      <dc:creator />
      <dc:date>2015-04-16T15:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850150#M1014614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( aggr( only(Test3), Test1, Test2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would rather look into your data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 15:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850150#M1014614</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-04-16T15:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850151#M1014615</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;My suggestion is to move the calculation into the load script. Maybe you'll also need to calc count of such records, sum of some fields, etc. But you'll definitely avoid extra calculations in run-time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 02:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850151#M1014615</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2015-07-14T02:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850152#M1014616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try Stefan's solution or Maxim's suggestion?&lt;/P&gt;&lt;P&gt;If it still does not work and you this as Set Analysis - post your data+error+desired result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 03:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850152#M1014616</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-07-14T03:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850153#M1014617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I simply added TEST1 and TEST 2 as dimensions into straight table and in Expression i used below and I could get what you described.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(distinct Test3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 05:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850153#M1014617</guid>
      <dc:creator>john9inno</dc:creator>
      <dc:date>2015-07-14T05:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: How we can use both Distinct and sum functions in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850154#M1014618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the Swuehl 's answer is perfect for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it on your given data . please see the qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 05:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-we-can-use-both-Distinct-and-sum-functions-in-set-analysis/m-p/850154#M1014618</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2015-07-14T05:33:46Z</dc:date>
    </item>
  </channel>
</rss>

