<?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 using set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123878#M907077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the rolling product revenue average of the last 4 months using set analysis in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1- &lt;SPAN style="color: #ff0000;"&gt;Calculate the revenue of the last 4 months per product per month per year (if revenue is negative, then zero)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #000000;"&gt;2-&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Divide the total by 4 (average per month) and then by 24 (average per workday)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #000000;"&gt;3-&lt;/SPAN&gt; &lt;SPAN style="color: #ff6600;"&gt;Calculate the average revenue per weekday for each product, month and year&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;4-&lt;SPAN style="color: #008000;"&gt; Calculate the average revenue per weekday day by day for all products&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt; &lt;SPAN style="color: #ff6600;"&gt; max(total&amp;lt;MONTH,YEAR,PRODUCT_ID&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; aggr(&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt; &lt;SPAN style="color: #ff0000;"&gt; sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; rangemax(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; rangesum(below(total &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 210px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; sum({&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 210px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,YEAR=,MONTH=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; &amp;gt;}REVENUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,0,4))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; PRODUCT_ID,YEAR,MONTH))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;/(4*24)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="color: #ff6600;"&gt;&amp;nbsp; PRODUCT_ID,YEAR,MONTH)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; YEAR,MONTH,PRODUCT_ID,DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is when a select one product, the table only shows the days that this product has a revenue. I would like to show all days of the month with its average revenue, even if the product doesnt have revenue in that day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: i have already read this document: &lt;A href="https://community.qlik.com/docs/DOC-4252" target="_blank"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>igorgois_</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>rolling average using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123878#M907077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the rolling product revenue average of the last 4 months using set analysis in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1- &lt;SPAN style="color: #ff0000;"&gt;Calculate the revenue of the last 4 months per product per month per year (if revenue is negative, then zero)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #000000;"&gt;2-&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Divide the total by 4 (average per month) and then by 24 (average per workday)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #000000;"&gt;3-&lt;/SPAN&gt; &lt;SPAN style="color: #ff6600;"&gt;Calculate the average revenue per weekday for each product, month and year&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;4-&lt;SPAN style="color: #008000;"&gt; Calculate the average revenue per weekday day by day for all products&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt; &lt;SPAN style="color: #ff6600;"&gt; max(total&amp;lt;MONTH,YEAR,PRODUCT_ID&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; aggr(&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt; &lt;SPAN style="color: #ff0000;"&gt; sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; rangemax(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; rangesum(below(total &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 210px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; sum({&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 210px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,YEAR=,MONTH=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; &amp;gt;}REVENUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 180px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,0,4))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; PRODUCT_ID,YEAR,MONTH))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;/(4*24)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;SPAN style="color: #ff6600;"&gt;&amp;nbsp; PRODUCT_ID,YEAR,MONTH)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; YEAR,MONTH,PRODUCT_ID,DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is when a select one product, the table only shows the days that this product has a revenue. I would like to show all days of the month with its average revenue, even if the product doesnt have revenue in that day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: i have already read this document: &lt;A href="https://community.qlik.com/docs/DOC-4252" target="_blank"&gt;Calculating rolling n-period totals, averages or other aggregations&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/rolling-average-using-set-analysis/m-p/1123878#M907077</guid>
      <dc:creator>igorgois_</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: rolling average using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123879#M907078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's brute force, but if at all practical, maybe add records with 0 REVENUE for all missing days by product? I'm guessing it's not practical, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 21:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123879#M907078</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-06-27T21:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: rolling average using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123880#M907079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a cartesian product (left join without link keys) between product and calendar table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lifesaver! Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 17:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-average-using-set-analysis/m-p/1123880#M907079</guid>
      <dc:creator>igorgois_</dc:creator>
      <dc:date>2016-06-29T17:02:57Z</dc:date>
    </item>
  </channel>
</rss>

