<?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 Rolling average for 3 months in a pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246170#M24872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&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;I've looked into various solutions here for this sort of queries earlier, but perhaps because of the fields I am using, I may not be able to crack it. You will be able to understand when you look at the qvw. file attached.&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;I have the data from Apr to Sept this year. What I am trying to get is the rolling average: &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For April, I would like the expression to take the April value because no values before that. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For May, I would like it to take avg( April + May) values. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For June, I would like it to take avg(April + May + June). &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For July, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would like it to take the previous 3 months, i.e., avg(July, June and May), etc., so on and so forth for the following months.&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;In background colour, I would like the same as well. If the values don't meet the target, then Red, otherwise Green.&lt;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Any help is appreciated. I will keep trying too.&lt;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Dec 2016 10:09:22 GMT</pubDate>
    <dc:creator>infock12</dc:creator>
    <dc:date>2016-12-12T10:09:22Z</dc:date>
    <item>
      <title>Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246170#M24872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&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;I've looked into various solutions here for this sort of queries earlier, but perhaps because of the fields I am using, I may not be able to crack it. You will be able to understand when you look at the qvw. file attached.&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;I have the data from Apr to Sept this year. What I am trying to get is the rolling average: &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For April, I would like the expression to take the April value because no values before that. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For May, I would like it to take avg( April + May) values. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For June, I would like it to take avg(April + May + June). &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For July, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would like it to take the previous 3 months, i.e., avg(July, June and May), etc., so on and so forth for the following months.&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;In background colour, I would like the same as well. If the values don't meet the target, then Red, otherwise Green.&lt;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Any help is appreciated. I will keep trying too.&lt;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 10:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246170#M24872</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-12T10:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246171#M24873</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;Try this expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Rangesum(sum(Products)/Sum(ListCount), Before(ProductsPerSession))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 10:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246171#M24873</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-12-12T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246172#M24874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried this but it keeps adding for the previous months. For example, if values for Apr, May and June are 2.5, 2.0, 2.3 respectively, then it gives a value of 2.5, 4.5 and 6.8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I would like the average for the previous 3 months, so the value of June in this case should be (6.8)/3, which is 2.27.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 11:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246172#M24874</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-12T11:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246173#M24875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Kaushik,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I tried the below and it seems to be working. However, the values seem be to slightly off from the excel values. Not sure why. I have pasted both the files again with the workings.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;=RangeAvg(sum(Products)/Sum(ListCount), before(sum(Products)/Sum(ListCount),0,3))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I have attached both the excel sheet and qvw. I have pivoted in excel and showed the values in yellow to say how it compared to the qlikview pivot table. (Please note I have left the original table on the top in qvw that has the original expression and added another pivot with the above expression.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 11:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246173#M24875</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-12T11:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246174#M24876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this document helps: &lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 12:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246174#M24876</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-12T12:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246175#M24877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for sending this. Very useful indeed! I will give it a go with different options and let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 13:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246175#M24877</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-12T13:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246176#M24878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Gysbert and Kaushik,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;As I mentioned in my original e-mail, I would like to RAG rate the above table. I have got everything pretty much right, but just one final bit is missing. I am saying for every column (which is the month), look at the previous column( previous month) and if it is higher, then make it red, otherwise green. It works but for the first month, everything is showing in Red. I wanted the first column to take 'Target' as the benchmark and if the values are above Target, green arrow, otherwise Red arrow. You will understand when you see the attached file. Please let me know your thoughts.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 17:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246176#M24878</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-13T17:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246177#M24879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression:&lt;/P&gt;&lt;P&gt;=If(ColumnNo()=1, if(sum(Products)/Sum(ListCount)&amp;gt;=sum(Target),&amp;nbsp; 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png', 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png'),&lt;/P&gt;&lt;P&gt;If(Before(RangeAvg(sum(Products)/Sum(ListCount), before(sum(Products)/Sum(ListCount),0,3)))&amp;lt;RangeAvg(sum(Products)/Sum(ListCount), before(sum(Products)/Sum(ListCount),0,3)), 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png', 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png')&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 07:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246177#M24879</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-14T07:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling average for 3 months in a pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246178#M24880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked brilliantly gysbert!! Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 11:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-average-for-3-months-in-a-pivot-table/m-p/1246178#M24880</guid>
      <dc:creator>infock12</dc:creator>
      <dc:date>2016-12-14T11:12:17Z</dc:date>
    </item>
  </channel>
</rss>

