<?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: Sum on Unique Values in Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105600#M366185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The same Booking code appears multiple times, having same stay. Also, the&lt;/P&gt;&lt;P&gt;bstatus needs to be considered as Res. How can i incorporate that as well?&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2016 22:02:41 GMT</pubDate>
    <dc:creator>naziralala</dc:creator>
    <dc:date>2016-07-06T22:02:41Z</dc:date>
    <item>
      <title>Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105596#M366181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a new problem as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to Sum the Stay only based on Distinct Booking Code in a chart expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is below:&lt;/P&gt;&lt;P&gt;sum(&amp;nbsp; [DISTINCT]&amp;lt;BookingCode&amp;gt; Stay)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is giving error in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using the code as below:&lt;/P&gt;&lt;P&gt;aggr( Distinct sum(Stay), &lt;SPAN style="font-size: 13.3333px;"&gt;BookingCode&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;BStatus={'RES'}&amp;gt;[Distinct] &lt;SPAN style="font-size: 13.3333px;"&gt;BookingCode&lt;/SPAN&gt;},Stay)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;Sum(Aggr(Count(DISTINCT &lt;SPAN style="font-size: 13.3333px;"&gt;BookingCode&lt;/SPAN&gt;),Stay) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last one works, but I do not get the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105596#M366181</guid>
      <dc:creator>naziralala</dc:creator>
      <dc:date>2016-07-06T20:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105597#M366182</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: 13px;"&gt;&lt;STRONG&gt;Sum(Aggr(Sum(DISTINCT Stay), &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;BookingCode))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Aggr(Avg(Stay), &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;BookingCode))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Aggr(Only(Stay), &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;BookingCode))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 21:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105597#M366182</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-06T21:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105598#M366183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&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; If there is only one distinct value of Stay for each BookingCode then try this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(AGGR(Only(Stay),BookingCode))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 21:02:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105598#M366183</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-07-06T21:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105599#M366184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Maybe&lt;/SPAN&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(Aggr(sum(DISTINCT &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BookingCode&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;),Stay) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 21:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105599#M366184</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2016-07-06T21:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105600#M366185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The same Booking code appears multiple times, having same stay. Also, the&lt;/P&gt;&lt;P&gt;bstatus needs to be considered as Res. How can i incorporate that as well?&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 22:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105600#M366185</guid>
      <dc:creator>naziralala</dc:creator>
      <dc:date>2016-07-06T22:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105601#M366186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;May be this:&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"&gt;&lt;STRONG&gt;Sum(Aggr(Only({&amp;lt;bstatus = {'Res'}&amp;gt;} Stay),&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;BookingCode))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 22:06:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105601#M366186</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-06T22:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105602#M366187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like .....&lt;/P&gt;&lt;P&gt;Sum(Aggr(sum(DISTINCT {&amp;lt;bstatus={'Res'}&amp;gt;} BookingCode),Stay) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 22:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105602#M366187</guid>
      <dc:creator>vikramv</dc:creator>
      <dc:date>2016-07-06T22:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum on Unique Values in Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105603#M366188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hello,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Can you please assist why the code below is not working correctly?&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Aggr(Max({&amp;lt;bstatus = {'Res'}&lt;SPAN style="font-size: 13.3333px;"&gt;,BookingYear={$(=Max(BookingYear)-1)}&lt;/SPAN&gt;&amp;gt;} Cost), &lt;/STRONG&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BookingCode))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The below works fine though:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Aggr(Max({&amp;lt;bstatus = {'Res'}&amp;gt;} Cost), &lt;/STRONG&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BookingCode))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-on-Unique-Values-in-Chart/m-p/1105603#M366188</guid>
      <dc:creator>naziralala</dc:creator>
      <dc:date>2016-07-07T16:31:33Z</dc:date>
    </item>
  </channel>
</rss>

