<?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 QlikView Aggregation Calculation, need help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025424#M346554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone, &lt;/P&gt;&lt;P&gt;I ran into a problem when trying to calculate one of the charts % &lt;/P&gt;&lt;P&gt;So chart is displaying percentages at item level while i also have item group(therapeutic class)&amp;nbsp; witch is higher aggregation . &lt;/P&gt;&lt;P&gt;Currently it displayed top 5 items&amp;nbsp; for each therapeutic class . &lt;/P&gt;&lt;P&gt;The problem is that i need to take total amount in that therapeutic class not just for 5 items that are displayed but for all item and display percentage for those 5 items from total for the class . Please see below screenshot of the chart and my attempt to calculate that. Currently it only calculates percentage for one item in each class, but i need to display it for each item. &lt;/P&gt;&lt;P&gt;The code works if i do not do aggr in second part but it doesn't give me desired results . The reason i do aggr in second part is to get total for the whole class not just for those 5 items . &lt;/P&gt;&lt;P&gt;So pretty much its item /total (of the whole class )&lt;/P&gt;&lt;P&gt;Num(&lt;/P&gt;&lt;P&gt;(Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [MI EXT$]) +&lt;/P&gt;&lt;P&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Aggr(Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;}[MI EXT$]) +&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount),THPY_GRP_CD),$(vFmt%))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the screenshot you can see that its only calculates percentage for one random item but i need for each item .&lt;/P&gt;&lt;P&gt;In first one you can see its 40% which is correct number . &lt;/P&gt;&lt;P&gt;Its last column's total divided by net purchases .&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2016-03-18 09_03_45-100-BIQVW-D-002.ABSG.NET - Remote Desktop Connection.png" class="jive-image image-1" src="/legacyfs/online/118580_2016-03-18 09_03_45-100-BIQVW-D-002.ABSG.NET - Remote Desktop Connection.png" style="height: 119px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!!!!!!!!!!!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2016 13:11:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-18T13:11:25Z</dc:date>
    <item>
      <title>QlikView Aggregation Calculation, need help</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025424#M346554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone, &lt;/P&gt;&lt;P&gt;I ran into a problem when trying to calculate one of the charts % &lt;/P&gt;&lt;P&gt;So chart is displaying percentages at item level while i also have item group(therapeutic class)&amp;nbsp; witch is higher aggregation . &lt;/P&gt;&lt;P&gt;Currently it displayed top 5 items&amp;nbsp; for each therapeutic class . &lt;/P&gt;&lt;P&gt;The problem is that i need to take total amount in that therapeutic class not just for 5 items that are displayed but for all item and display percentage for those 5 items from total for the class . Please see below screenshot of the chart and my attempt to calculate that. Currently it only calculates percentage for one item in each class, but i need to display it for each item. &lt;/P&gt;&lt;P&gt;The code works if i do not do aggr in second part but it doesn't give me desired results . The reason i do aggr in second part is to get total for the whole class not just for those 5 items . &lt;/P&gt;&lt;P&gt;So pretty much its item /total (of the whole class )&lt;/P&gt;&lt;P&gt;Num(&lt;/P&gt;&lt;P&gt;(Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [MI EXT$]) +&lt;/P&gt;&lt;P&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Aggr(Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;}[MI EXT$]) +&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount),THPY_GRP_CD),$(vFmt%))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the screenshot you can see that its only calculates percentage for one random item but i need for each item .&lt;/P&gt;&lt;P&gt;In first one you can see its 40% which is correct number . &lt;/P&gt;&lt;P&gt;Its last column's total divided by net purchases .&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2016-03-18 09_03_45-100-BIQVW-D-002.ABSG.NET - Remote Desktop Connection.png" class="jive-image image-1" src="/legacyfs/online/118580_2016-03-18 09_03_45-100-BIQVW-D-002.ABSG.NET - Remote Desktop Connection.png" style="height: 119px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!!!!!!!!!!!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 13:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025424#M346554</guid>
      <dc:creator />
      <dc:date>2016-03-18T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Aggregation Calculation, need help</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025425#M346555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please share sample data.&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 09:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025425#M346555</guid>
      <dc:creator>amayuresh</dc:creator>
      <dc:date>2016-03-21T09:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Aggregation Calculation, need help</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025426#M346556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Num(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;(Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [MI EXT$]) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Aggr(&lt;SPAN style="color: #ff0000;"&gt;NODISTINCT&lt;/SPAN&gt; Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;}[MI EXT$]) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount),THPY_GRP_CD),$(vFmt%))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 09:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025426#M346556</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T09:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Aggregation Calculation, need help</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025427#M346557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure but give it a try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [MI EXT$]) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({($&amp;lt;[CNT_ID]={Y}&amp;gt; + $&amp;lt;[Returns Contract_Indicator]={Y}&amp;gt; + $&amp;lt;Contract_Indicator={Y}&amp;gt;) * $&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(total &amp;lt;Item&amp;gt; {$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;}[MI EXT$]) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;total &amp;lt;Item&amp;gt; &lt;/SPAN&gt;{$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} [Returns Net_Amount]) +&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;total &amp;lt;Item&amp;gt; &lt;/SPAN&gt;{$&amp;lt;YearMonthNumber={"$(vCurrPeriodRange)"}&amp;gt;} CNet_Amount),THPY_GRP_CD))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 09:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025427#M346557</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-21T09:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Aggregation Calculation, need help</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025428#M346558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you that worked !!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Aggregation-Calculation-need-help/m-p/1025428#M346558</guid>
      <dc:creator />
      <dc:date>2016-03-21T13:25:42Z</dc:date>
    </item>
  </channel>
</rss>

