<?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: Help: Sum(value/ Count Distinct) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072449#M927695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're nesting aggregation functions. That's possible but then you need to specify which dimensions need to be used to create a list of counts of monthnumbers. You can use the aggr function for that:&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: 13.3333px;"&gt;sum(value)/sum(numbers/aggr(count(DISTINCT monthnumber),MyDim1, MyDim2, ... MyDimN))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2016 16:10:14 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-03-25T16:10:14Z</dc:date>
    <item>
      <title>Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072447#M927693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cant figure this out, what am i doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i do it like this i have no problems, i get the right numbers,&amp;nbsp; the 11 is based count of the months. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum(value)/sum(numbers/11))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i try it like this based on the months i have selected its not working:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum(value)/sum(numbers/count(DISTINCT monthnumber))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;anyone?&lt;BR /&gt;&lt;/SPAN&gt;&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/Help-Sum-value-Count-Distinct/m-p/1072447#M927693</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072448#M927694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can share ur sample app?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r u trying in chart&amp;nbsp; or text object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:09:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072448#M927694</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-03-25T16:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072449#M927695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're nesting aggregation functions. That's possible but then you need to specify which dimensions need to be used to create a list of counts of monthnumbers. You can use the aggr function for that:&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: 13.3333px;"&gt;sum(value)/sum(numbers/aggr(count(DISTINCT monthnumber),MyDim1, MyDim2, ... MyDimN))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072449#M927695</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-25T16:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072450#M927696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&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: 13.3333px;"&gt;&lt;STRONG&gt;Sum(value)/(Sum(numbers)/Count(DISTINCT monthnumber))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072450#M927696</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-25T16:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072451#M927697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use aggregation function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072451#M927697</guid>
      <dc:creator>Ireneusz_Łomzik</dc:creator>
      <dc:date>2016-03-25T16:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072452#M927698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ill add a sample soon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:34:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072452#M927698</guid>
      <dc:creator />
      <dc:date>2016-03-25T16:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072453#M927699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried this, its giving me the wrong output&lt;/P&gt;&lt;P&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072453#M927699</guid>
      <dc:creator />
      <dc:date>2016-03-25T16:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Sum(value/ Count Distinct)</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072454#M927700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Knipsel2.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/119433_Knipsel2.PNG" style="height: 58px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how it looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;number:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum(number)/count(DISTINCT monthnumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;total value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum(value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;im trying to calculate price just like the &lt;STRONG&gt;"number" expression:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;its only working like this &amp;gt; &lt;SPAN style="font-family: inherit; font-size: 13.3333px; font-style: inherit; font-weight: inherit; color: #3d3d3d; line-height: 1.5em;"&gt;&lt;STRONG&gt;sum(value)/sum(numbers/11))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expressions gives me an error when i put it like this&amp;gt; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;sum(value)/sum(numbers/count(DISTINCT monthnumber))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;i wanna use the count(distinct monthnumber) function to calculate the price based on YTD&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 18:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Sum-value-Count-Distinct/m-p/1072454#M927700</guid>
      <dc:creator />
      <dc:date>2016-03-25T18:00:06Z</dc:date>
    </item>
  </channel>
</rss>

