<?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: Total and Aggr in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Total-and-Aggr/m-p/127098#M8889</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&gt;&lt;STRONG&gt;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateTime&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration*#Spread)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&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;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateTime&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv*#SpreadPrv)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2018 16:05:32 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-08-10T16:05:32Z</dc:date>
    <item>
      <title>Total and Aggr</title>
      <link>https://community.qlik.com/t5/App-Development/Total-and-Aggr/m-p/127097#M8888</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 want to use the Aggr function where one of the variables inn the function needs to calculate the total value for the portfolio at each date and the other variables will aggregate on the dimension defined in the aggr function on each date multiplied by the change in the total portfolio value. I only want one dimension in the chart.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i use TOTAL in the variable that calculates the total portfolio value it takes all the dates and calculates one aggregated value for all dates in the Aggr function, disregarding the dimension in chart. I guess this is as expected, but I want the TOTAL function to calculate for each date in the expression below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum(aggr($(&lt;SPAN style="color: #99cc00;"&gt;vbPrvSD&lt;/SPAN&gt;)* $(&lt;SPAN style="color: #3366ff;"&gt;vbDSpreadTot&lt;/SPAN&gt;)),SecBondSectorName,DateTime))&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="color: #99cc00; font-size: 13.3333px;"&gt;sum({&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}#MaturityWeightPrv*#SpreadDurationPrv*#RiskExpWgtPrv)/sum({&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}#RiskExpWgtPrv*#MaturityWeightPrv)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; color: #3366ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration*#Spread)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv*#SpreadPrv)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Haavard &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 09:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-and-Aggr/m-p/127097#M8888</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-10T09:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Total and Aggr</title>
      <link>https://community.qlik.com/t5/App-Development/Total-and-Aggr/m-p/127098#M8889</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&gt;&lt;STRONG&gt;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateTime&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration*#Spread)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgt*#MaturityWeightPrv*#SpreadDuration)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&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;sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateTime&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt; #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv*#SpreadPrv)/sum({$&amp;lt;Portfolio=P([PortfolioRHS])&amp;gt;}TOTAL #RiskExpWgtPrv*#MaturityWeightPrv*#SpreadDurationPrv)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 16:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-and-Aggr/m-p/127098#M8889</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-10T16:05:32Z</dc:date>
    </item>
  </channel>
</rss>

