<?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: Last 3 days average in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27143#M606521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry &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;Try&amp;nbsp; in this way &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; =avg({&amp;lt;Date=,End={'&amp;gt;$(=max(Date)-2)'}&amp;gt;}Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2018 13:37:51 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2018-02-28T13:37:51Z</dc:date>
    <item>
      <title>Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27140#M606518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a few different ideas to get an average of leads generated but I don't seem to be able to get it right. I'm either returned a value of 0 or the value of leads for the date I have selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should calculated as an average of the last 3 days excluding weekends. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One&lt;/P&gt;&lt;P&gt;______________________________________________________________&lt;/P&gt;&lt;P&gt;avg({&amp;lt;[Date] = {"&amp;gt;=$(vMaxDateLess3) &amp;lt;=$(vMaxDateNoWeekend)"}client_category_target_lead_count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDateLess3 &lt;SPAN style="font-size: 10pt;"&gt;=Date(if(weekday(vMaxDateNoWeekend-3)='Fri',vMaxDateNoWeekend-4,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(weekday(vMaxDateNoWeekend-3)='Sat',vMaxDateNoWeekend-4,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(weekday(vMaxDateNoWeekend-2)='Sat',vMaxDateNoWeekend-3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vMaxDateNoWeekend-2))),'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxDateNoWeekend&lt;/SPAN&gt;=Date(if(weekday(vMaxDate-1)='Sat',vMaxDate-2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(weekday(vMaxDate-1)='Sun',vMaxDate-3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(Date(vMaxDate-1,'YYYY-MM-DD'), $(vPHolidays)) and not Match(weekday(vMaxDate-2),'Sat','Sun') ,vMaxDate-2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(Date(vMaxDate-1,'YYYY-MM-DD'), $(vPHolidays)) and Match(weekday(vMaxDate-2),'Sun') ,vMaxDate-4,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(Date(vMaxDate-1,'YYYY-MM-DD'), $(vPHolidays)) and Match(weekday(vMaxDate-2),'Sat') ,vMaxDate-3,&amp;nbsp; vMaxDate-1))))),'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate= max(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Two&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;_________________________________________________________________&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;DATE={'$(=Date(max(DATE)-3)))'}, Month, Day&amp;gt;} client_category_target_lead_count)/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Three&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;__________________________________________________________________&lt;/P&gt;&lt;P&gt;=((sum({&amp;lt;Date = {"&amp;gt;=$(=Date(today()-3))&amp;lt;=$(=Date(today()))"}&amp;gt;} client_category_target_lead_count))&lt;/P&gt;&lt;P&gt;+(sum({&amp;lt;Date = {"&amp;gt;=$(=Date(today()-2))&amp;lt;=$(=Date(today()))"}&amp;gt;} client_category_target_lead_count))&lt;/P&gt;&lt;P&gt;+(sum({&amp;lt;Date = {"&amp;gt;=$(=Date(today()-1))&amp;lt;=$(=Date(today()))"}&amp;gt;} client_category_target_lead_count)))/3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27140#M606518</guid>
      <dc:creator>mgdotcom</dc:creator>
      <dc:date>2018-02-28T13:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27141#M606519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Average last three days:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Date&lt;/SPAN&gt; = {'$(=date(today(0)-3))'}&amp;gt;}&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Measure&lt;/SPAN&gt;)/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Three day rolling average:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;rangeavg&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;(&lt;/SPAN&gt;above&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;(&lt;/SPAN&gt;sum&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Measure&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;),0,3))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27141#M606519</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2018-02-28T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27142#M606520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chanty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here on your first expression, there is not an '&amp;gt;=' missing ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27142#M606520</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-28T13:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27143#M606521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry &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;Try&amp;nbsp; in this way &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; =avg({&amp;lt;Date=,End={'&amp;gt;$(=max(Date)-2)'}&amp;gt;}Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27143#M606521</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2018-02-28T13:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27144#M606522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;Thank you for your response&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; = {'$(=date(today(0)-3))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;Measure&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)/3 &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;gives a '0'&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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;rangeavg&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;above&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;Measure&lt;/SPAN&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;),0,3))&lt;/SPAN&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;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;gives me the same value as the current day&lt;/SPAN&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;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:46:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27144#M606522</guid>
      <dc:creator>mgdotcom</dc:creator>
      <dc:date>2018-02-28T13:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27145#M606523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure about the syntax in &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=avg({&amp;lt;Date=,End={'&amp;gt;$(=max(Date)-2)'}&amp;gt;}Measure)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27145#M606523</guid>
      <dc:creator>mgdotcom</dc:creator>
      <dc:date>2018-02-28T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 days average</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27146#M606524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here end is Enddate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-days-average/m-p/27146#M606524</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2018-02-28T13:50:22Z</dc:date>
    </item>
  </channel>
</rss>

