<?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: Sorting with aggr function for rolling 12 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427503#M816373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the guidance , the expression is working fine only when Year and month are not selected.&lt;/P&gt;&lt;P&gt;But when we select Year and month the Rolling month value is same as that of the Actual sales value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the rolling 12 month value should be same even after selecting Year and Month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Sep 2017 15:26:51 GMT</pubDate>
    <dc:creator>aniketsr</dc:creator>
    <dc:date>2017-09-11T15:26:51Z</dc:date>
    <item>
      <title>Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427499#M816367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi qlikers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem in the rolling 12 months where in even after sorting the columns in the script the values are not coming as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam attaching a sample qvw and data for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/57428" target="_blank"&gt;kush141087&lt;/A&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/Sorting-with-aggr-function-for-rolling-12/m-p/1427499#M816367</guid>
      <dc:creator>aniketsr</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427500#M816369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No need to do grouping in script, try below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(RangeSum(Above(&lt;/P&gt;&lt;P&gt;Round(&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(total &amp;lt;Region,intYearMonth&amp;gt;Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,0.000000000001),0,12))&lt;STRONG&gt;*Avg(1)&lt;/STRONG&gt;,Region,intYearMonth))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2017 10:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427500#M816369</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-09-02T10:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427501#M816370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kushal ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help i have implemented the same script in the actual formula but the values are coming Zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be wrong somewhere hence iam attaching the application for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2017 15:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427501#M816370</guid>
      <dc:creator>aniketsr</dc:creator>
      <dc:date>2017-09-02T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427502#M816371</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;STRONG&gt;=&lt;SPAN style="color: #ff0000;"&gt;Aggr(RangeSum(Above(&lt;/SPAN&gt;if(Match(Prod1,'Equities','Syndicate'),Sum(EV) +(Sum({$&amp;lt;ActivityType = {'BCE'}&amp;gt;} Expense) *-1),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(EV) +(if(vLTC=1,if(Match(Prod1,'Equities','Syndicate'),'',Sum({$&amp;lt;ActivityType = {'LTC'},Prod1 -={'Commodities'}&amp;gt;}Expense)*-1) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'LTC'},Prod1 ={'Commodities'}&amp;gt;}Expense),0)*-1) +(Sum({$&amp;lt;ActivityType = {'BCE'}&amp;gt;} Expense) *-1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({$&amp;lt;ActivityType = {'Sales Direct','Direct'},Prod1 -={'FI Syndicate','Commodities'}&amp;gt;} Expense)+ sum({&amp;lt;EmployeeType = {'Sales','Sales Trader'}&amp;gt;}Cost) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+ Sum({$&amp;lt;ActivityType = {'Sales Direct'},Prod1 ={'Commodities'}&amp;gt;} Expense) )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({$&amp;lt;ActivityType = {'Sales Inter-Intra'},Prod1 -={'Commodities'}&amp;gt;} Expense)+sum({&amp;lt;ActivityType = {'Net Inter Intra - Other','Net Inter Intra - Producing' }&amp;gt;}Expense))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'Research'}&amp;gt;} Expense)+Sum({$&amp;lt;MasterActivityType = {'CSS'}&amp;gt;} Expense)+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;ActivityType ={'Product Access','Analyst Activity','Corp Access'}&amp;gt;}CostByProduct)/1000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'Trading'} ,Prod1 -={'Inv. Services'}&amp;gt;} Expense)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;SPAN style="color: #ff0000;"&gt;, 0, 12)), Region, intYearMonth)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/175450_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2017 19:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427502#M816371</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-02T19:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427503#M816373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the guidance , the expression is working fine only when Year and month are not selected.&lt;/P&gt;&lt;P&gt;But when we select Year and month the Rolling month value is same as that of the Actual sales value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the rolling 12 month value should be same even after selecting Year and Month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:26:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427503#M816373</guid>
      <dc:creator>aniketsr</dc:creator>
      <dc:date>2017-09-11T15:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting with aggr function for rolling 12</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427504#M816374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(RangeSum(Above(if(Match(Only({1} Prod1),'Equities','Syndicate'),Sum({&amp;lt;Year, MONTH_SHORT_NAME&amp;gt;}EV) +(Sum({$&amp;lt;ActivityType = {'BCE'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense) *-1),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Year, MONTH_SHORT_NAME&amp;gt;}EV) +(if(vLTC=1,if(Match(Only({1} Prod1),'Equities','Syndicate'),'',Sum({$&amp;lt;ActivityType = {'LTC'},Prod1 -={'Commodities'}, Year, MONTH_SHORT_NAME&amp;gt;}Expense)*-1) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'LTC'},Prod1 ={'Commodities'}, Year, MONTH_SHORT_NAME&amp;gt;}Expense),0)*-1) +(Sum({$&amp;lt;ActivityType = {'BCE'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense) *-1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({$&amp;lt;ActivityType = {'Sales Direct','Direct'},Prod1 -={'FI Syndicate','Commodities'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense)+ sum({&amp;lt;EmployeeType = {'Sales','Sales Trader'}, Year, MONTH_SHORT_NAME&amp;gt;}Cost) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+ Sum({$&amp;lt;ActivityType = {'Sales Direct'},Prod1 ={'Commodities'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense) )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({$&amp;lt;ActivityType = {'Sales Inter-Intra'},Prod1 -={'Commodities'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense)+sum({&amp;lt;ActivityType = {'Net Inter Intra - Other','Net Inter Intra - Producing' }, Year, MONTH_SHORT_NAME&amp;gt;}Expense))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'Research'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense)+Sum({$&amp;lt;MasterActivityType = {'CSS'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense)+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;ActivityType ={'Product Access','Analyst Activity','Corp Access'}, Year, MONTH_SHORT_NAME&amp;gt;}CostByProduct)/1000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;ActivityType = {'Trading'} ,Prod1 -={'Inv. Services'}, Year, MONTH_SHORT_NAME&amp;gt;} Expense)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;), 0, 12)), Region, intYearMonth)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-with-aggr-function-for-rolling-12/m-p/1427504#M816374</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-11T15:37:02Z</dc:date>
    </item>
  </channel>
</rss>

