<?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: 14 Day Rolling Average Percentage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732528#M721376</link>
    <description>&lt;P&gt;I do something similar using Henric's&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_self"&gt;As-Of-Table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dimension for the chart is the AsOfDate.&lt;/P&gt;&lt;P&gt;The Bar expression is&amp;nbsp;Count({$&amp;lt;DayDiff={0}&amp;gt;} Patient), the DayDiff={0} limits the count to individual days&lt;/P&gt;&lt;P&gt;The Line expression is&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;DayDiff={"&amp;lt;14"}&amp;gt;}Patient)&lt;BR /&gt;/ Count({$&amp;lt;DayDiff={"&amp;lt;14"},Date={"&amp;gt;=$(=Min(Aggr(Only({$&amp;lt;DayDiff={0}}&amp;gt;}Date),Date,Date)))"}&amp;gt;}Distinct Date)&lt;/P&gt;&lt;P&gt;The DayDiff={"&amp;lt;14"} counts the patients for the last 14 days&lt;/P&gt;&lt;P&gt;The&amp;nbsp;Date={"&amp;gt;=$(=Min(Aggr(Only({$&amp;lt;DayDiff={0}}&amp;gt;}Date),Date,Date)))"} is to identify the earliest date with data.&amp;nbsp; This is needed because when you are at the beginning of the data set, you want to divide the numerator with the number of days that had data.&amp;nbsp; For most of the days is will be 14, but early on it will range from 14 to 1.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jul 2020 18:46:27 GMT</pubDate>
    <dc:creator>jwjackso</dc:creator>
    <dc:date>2020-07-31T18:46:27Z</dc:date>
    <item>
      <title>14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732496#M721375</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am currently trying to create combo chart that includes a bar graph for total tests and the line&amp;nbsp; would be for a 14 day rolling average % for patients that test positive to the certain test. I am having problems putting together the 14 day rolling average %.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the fields that I have include the following: OrderDate, Test, and CustomerID. Each point should take into consideration the past 14 dates and create an average percentage for tests that came back positive. Unfortunatly I don't have any test data, but can help clarify anything if needed.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732496#M721375</guid>
      <dc:creator>rtr13</dc:creator>
      <dc:date>2024-11-16T18:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732528#M721376</link>
      <description>&lt;P&gt;I do something similar using Henric's&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_self"&gt;As-Of-Table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dimension for the chart is the AsOfDate.&lt;/P&gt;&lt;P&gt;The Bar expression is&amp;nbsp;Count({$&amp;lt;DayDiff={0}&amp;gt;} Patient), the DayDiff={0} limits the count to individual days&lt;/P&gt;&lt;P&gt;The Line expression is&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;DayDiff={"&amp;lt;14"}&amp;gt;}Patient)&lt;BR /&gt;/ Count({$&amp;lt;DayDiff={"&amp;lt;14"},Date={"&amp;gt;=$(=Min(Aggr(Only({$&amp;lt;DayDiff={0}}&amp;gt;}Date),Date,Date)))"}&amp;gt;}Distinct Date)&lt;/P&gt;&lt;P&gt;The DayDiff={"&amp;lt;14"} counts the patients for the last 14 days&lt;/P&gt;&lt;P&gt;The&amp;nbsp;Date={"&amp;gt;=$(=Min(Aggr(Only({$&amp;lt;DayDiff={0}}&amp;gt;}Date),Date,Date)))"} is to identify the earliest date with data.&amp;nbsp; This is needed because when you are at the beginning of the data set, you want to divide the numerator with the number of days that had data.&amp;nbsp; For most of the days is will be 14, but early on it will range from 14 to 1.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 18:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732528#M721376</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-07-31T18:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732530#M721377</link>
      <description>&lt;P&gt;This is helpful! A question I have is when coming up with the DayDiff variable, within the AsOfTable, will I replace Month with Date to create the DayDiff variable?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732530#M721377</guid>
      <dc:creator>rtr13</dc:creator>
      <dc:date>2020-07-31T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732531#M721378</link>
      <description>&lt;P&gt;You can replace the MonthDiff or just add the DayDiff.&amp;nbsp; It depends if you would be doing any Rolling Month calculations as well as Rolling Days.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732531#M721378</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-07-31T19:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732532#M721379</link>
      <description>&lt;P&gt;Just to be clear, you would replace Month with Date.&amp;nbsp; But like in the original you could have a DayDiff, MonthDiff and YearDiff if they were helpful&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732532#M721379</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-07-31T19:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732534#M721380</link>
      <description>&lt;P&gt;This is perfect. When it comes to adding in DayDiff within the AsOfTable, how would this be calculated? Within the AsOfTable when calculating MonthDiff it uses the following:&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Round&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;AsOfMonth&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Month&lt;/SPAN&gt;&lt;SPAN&gt;)*12/365.2425)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MonthDiff. Would this be replaced with&amp;nbsp;&amp;nbsp;&amp;nbsp;Round((AsOfMonth-Month)/365.2425)&amp;nbsp;as&amp;nbsp;DayDiff to accurately represent DayDiff?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732534#M721380</guid>
      <dc:creator>rtr13</dc:creator>
      <dc:date>2020-07-31T19:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: 14 Day Rolling Average Percentage</title>
      <link>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732537#M721381</link>
      <description>&lt;P&gt;In our case, we are&amp;nbsp; only looking at most a Rolling 30 Day window.&amp;nbsp; The DayDiff is just AsOfDate - Date.&amp;nbsp; The section in bold below limits the DayDiff&amp;nbsp; from 0 to 30.&lt;/P&gt;&lt;P&gt;tmpAsOfDate:&lt;BR /&gt;Load Distinct Date&lt;BR /&gt;Resident MasterCalendar&lt;BR /&gt;Where Date &amp;gt;= Date('03/01/2020','MM/DD/YYYY');&lt;BR /&gt;join (tmpAsOfDate)&lt;BR /&gt;Load Date as AsOfDate&lt;BR /&gt;Resident tmpAsOfDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AsOfDate:&lt;BR /&gt;Load Date,&lt;BR /&gt;AsOfDate,&lt;BR /&gt;AsOfDate - Date as DayDiff;&lt;BR /&gt;Load Date,&lt;BR /&gt;AsOfDate&lt;BR /&gt;Resident tmpAsOfDate&lt;BR /&gt;&lt;STRONG&gt;where AsOfDate &amp;gt;= Date and AsOfDate &amp;lt;= Date + 30;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Drop Table tmpAsOfDate;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/14-Day-Rolling-Average-Percentage/m-p/1732537#M721381</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-07-31T19:29:12Z</dc:date>
    </item>
  </channel>
</rss>

