<?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 Moving average with non consecutive data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Moving-average-with-non-consecutive-data/m-p/1636266#M47400</link>
    <description>&lt;P&gt;Hello everyone,,&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I would like to calculate the moving average of counts of my data.&lt;/P&gt;&lt;P&gt;My data describes each time an asset has been inspected/repaired by its AssetNum, so i will have a row for every time an Asset has been visited. Many assets may be visited in one day, but there are days where no assets have been visited&lt;/P&gt;&lt;P&gt;I would like to have a moving average over 30 days, preferably centred on the current day.&lt;/P&gt;&lt;P&gt;I know i could do this with RangeAvg(Above(count(AssetNum),-15,30)) if the data had consecutive dates available.&lt;/P&gt;&lt;P&gt;I have tried this formula to calculate the average over the past 30 days, but the distinct counting of the dates in the range isn't working, can someone offer some advice?&lt;/P&gt;&lt;P&gt;Status_Date is the date, and ASSETNUM is a alphanumeric id for each asset.&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Status_Date={"&amp;gt;=$(=max(Status_Date)-30)&amp;lt;=$(=max(Status_Date))"}&amp;gt;} ASSETNUM)/ count(distinct {&amp;lt;Status_Date={"&amp;gt;=$(=max(Status_Date)-30)&amp;lt;=$(=max(Status_Date))"}&amp;gt;} ASSETNUM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 16 Oct 2019 17:32:21 GMT</pubDate>
    <dc:creator>Mitubhai</dc:creator>
    <dc:date>2019-10-16T17:32:21Z</dc:date>
    <item>
      <title>Moving average with non consecutive data</title>
      <link>https://community.qlik.com/t5/App-Development/Moving-average-with-non-consecutive-data/m-p/1636266#M47400</link>
      <description>&lt;P&gt;Hello everyone,,&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;I would like to calculate the moving average of counts of my data.&lt;/P&gt;&lt;P&gt;My data describes each time an asset has been inspected/repaired by its AssetNum, so i will have a row for every time an Asset has been visited. Many assets may be visited in one day, but there are days where no assets have been visited&lt;/P&gt;&lt;P&gt;I would like to have a moving average over 30 days, preferably centred on the current day.&lt;/P&gt;&lt;P&gt;I know i could do this with RangeAvg(Above(count(AssetNum),-15,30)) if the data had consecutive dates available.&lt;/P&gt;&lt;P&gt;I have tried this formula to calculate the average over the past 30 days, but the distinct counting of the dates in the range isn't working, can someone offer some advice?&lt;/P&gt;&lt;P&gt;Status_Date is the date, and ASSETNUM is a alphanumeric id for each asset.&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Status_Date={"&amp;gt;=$(=max(Status_Date)-30)&amp;lt;=$(=max(Status_Date))"}&amp;gt;} ASSETNUM)/ count(distinct {&amp;lt;Status_Date={"&amp;gt;=$(=max(Status_Date)-30)&amp;lt;=$(=max(Status_Date))"}&amp;gt;} ASSETNUM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Oct 2019 17:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Moving-average-with-non-consecutive-data/m-p/1636266#M47400</guid>
      <dc:creator>Mitubhai</dc:creator>
      <dc:date>2019-10-16T17:32:21Z</dc:date>
    </item>
  </channel>
</rss>

