<?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: Average 30 last days for each date selected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959970#M963816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you formatted the variables correctly as dates?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does your expression show after expanding the variables (you can see this when you remove the expression label, then hover with the mouse over the chart expression label)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Oct 2015 13:40:06 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-10-12T13:40:06Z</dc:date>
    <item>
      <title>Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959969#M963815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I will give you an example if you can help me to resolve my problem. i was not able to resolve the problem since one week &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;I have to compare the number of transactions of one day to last 3 days.&lt;/P&gt;&lt;P&gt;for the date i have a field : Date_Appli&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 155px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" width="155"&gt;22/09/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17"&gt;23/09/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17"&gt;24/09/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17"&gt;25/09/2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field dimension is&amp;nbsp;&amp;nbsp; "primary_asset_class" which has 5 values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 514px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="158"&gt;PRIMARY_ASSET_CLASS&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="167"&gt;= sum(FLAG_DTCC_EOD_SENT) &lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="189"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: medium none;"&gt;5469306&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;273,034&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" style="border-top: medium none;"&gt;Equity&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1600973&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;400,386&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" style="border-top: medium none;"&gt;InterestRate&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1583450&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;394,698&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" style="border-top: medium none;"&gt;ForeignExchange&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;1156549&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;288,403&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" style="border-top: medium none;"&gt;Credit&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;733281&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;183,049&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" style="border-top: medium none;"&gt;Commodity&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;395053&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;98,635&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to calculate the average&amp;nbsp; i have used this expression : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(MinDate) &amp;lt; $(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;For information i have defined the variables used in expression like this : &lt;/P&gt;&lt;P&gt;MaxDate&amp;nbsp; =&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MinDate = MaxDate -3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Normaly when i select 25/09/2015 (Sept 25th 2015) i will get in the the ceil "average" the average of the transaction of 3 previous days (Sept 24th, sept 23th and sept 22th). but it not working --&amp;gt; it shows this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="514"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="158"&gt;PRIMARY_ASSET_CLASS&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="167"&gt;= sum(FLAG_DTCC_EOD_SENT) &lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="189"&gt;Average&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: medium none;"&gt;1373791&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: medium none;"&gt;Equity&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;399815&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: medium none;"&gt;InterestRate&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;399355&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: medium none;"&gt;ForeignExchange&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;291340&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: medium none;"&gt;Credit&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;184133&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: medium none;"&gt;Commodity&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-left: medium none; border-top: medium none;"&gt;99148&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 12:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959969#M963815</guid>
      <dc:creator />
      <dc:date>2015-10-12T12:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959970#M963816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you formatted the variables correctly as dates?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does your expression show after expanding the variables (you can see this when you remove the expression label, then hover with the mouse over the chart expression label)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 13:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959970#M963816</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-12T13:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959971#M963817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field for date (date_appli ) is formated as numeric,&lt;/P&gt;&lt;P&gt;the expression show&amp;nbsp; : date_appli &amp;gt;=42247 &amp;lt;=42277.&lt;/P&gt;&lt;P&gt;the expression&amp;nbsp; calculate correctly the average for all dates. but it doasn't work when i select one date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have defined the format of date_appli in report propertise as numerci in the variable also the format is numerci.&lt;/P&gt;&lt;P&gt;Normaly no problem with the comparaison&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 14:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959971#M963817</guid>
      <dc:creator />
      <dc:date>2015-10-12T14:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959972#M963818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you selecting on calendar fields other than date_appli (i.e. another field with date granularity)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may end up with an incompatible set definition then, hence you need to clear all selections in calendar fields, like AnotherDate, Month, Year, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;"&amp;gt;=$(MinDate) &amp;lt; $(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;}, &lt;STRONG&gt;AnotherDateField=&lt;/STRONG&gt;&amp;nbsp; &amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also need to apply the set expression to the outer aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; 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;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;STRONG&gt;{&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;"&amp;gt;=$(MinDate) &amp;lt; $(MaxDate)"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;STRONG&gt;}, AnotherDateField=&amp;nbsp; &amp;gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;"&amp;gt;=$(MinDate) &amp;lt; $(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;}, AnotherDateField=&amp;nbsp; &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, it's easier to help if you post a small sample QVW that shows your issue, since there might be different places needed to look at.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 14:37:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959972#M963818</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-12T14:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959973#M963819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gabrie , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood your problem , to&amp;nbsp; resolve this create dummy field for Date_Appli and make format of that date to number &lt;/P&gt;&lt;P&gt;like as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load .&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,Date_Appli&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Num(Date_Appli) as NewDate&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;After that just make small change in your existing expression ,&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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;=&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;NewDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;"&amp;gt;=$(MinDate) &amp;lt; $(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this will work , Happy Learning .&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-&lt;SPAN style="line-height: 1.5em;"&gt;Nitesh Chavan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 14:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959973#M963819</guid>
      <dc:creator />
      <dc:date>2015-10-12T14:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959974#M963820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Chavane,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what i have already done, see the code below :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;SUB&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;srGenerateCalendar&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;pCalendarName&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;pDateFieldName&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(pCalendarName)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InvoiceDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[$(pDateFieldName)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;...etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Knowing that &lt;/SPAN&gt;(pDateFieldName) = date_appli&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your suggestion.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 16:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959974#M963820</guid>
      <dc:creator />
      <dc:date>2015-10-12T16:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959975#M963821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to post a sample QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 16:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959975#M963821</guid>
      <dc:creator />
      <dc:date>2015-10-12T16:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959976#M963822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your most likely issue is that you need to reflect any set analysis condition in both&lt;STRONG&gt; the outer and inner&lt;/STRONG&gt; aggregation functions. Currently, your Avg() function is subject to your current selections (i.e. {$}) so when you select a DATE_APPLI your outer function will restrict the average to act upon only the date selected. I wouldn't have expected NULL back as your results however, but never the less, my educated guess is that you will get your desired result by copying the set analysis statement from the inner aggregation function sum() to the outer aggregation function avg() like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;"&amp;gt;=$(MinDate)&amp;lt;$(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;"&amp;gt;=$(MinDate)&amp;lt;$(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px;"&gt;If that still doesn't help - create a pivot table with two dimensions: &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_APPLI &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and one expression: &lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_APPLI&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;"&amp;gt;=$(MinDate)&amp;lt;$(MaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;FLAG_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) with Presentation option 'always fully expanded' ticked and inspect the results. This is effectively a representation of your "invisible" table of data returned by the aggr() function to the outer Average aggregation function. If you can't spot the issue still - try building a List Box of your DATE_APPLI field and manually test the Set Analysis filter condition by searching for: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;=42247&amp;lt;=42277. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;By now you should have found your issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I hope it helps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jonas&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 22:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959976#M963822</guid>
      <dc:creator>JonasValleskog</dc:creator>
      <dc:date>2015-10-12T22:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959977#M963823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answers you already got covers most common problems with this kind of expression.&lt;/P&gt;&lt;P&gt;If you still can't make it work please post a sample application with your problem because then it sounds as you have not explained it properly or are omitting some vital detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 07:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959977#M963823</guid>
      <dc:creator>Anders_Eriksson</dc:creator>
      <dc:date>2015-10-13T07:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959978#M963824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer ..&lt;/P&gt;&lt;P&gt;the correct exepression&amp;nbsp; for my porjetc (not for the example i have done in questionis) is :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Application date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(vMinDate)&amp;lt;$(vMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DealValo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={1}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RowNo_VIP_REP_DTCC_EOD_SENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRIMARY_ASSET_CLASS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Application date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 12:55:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959978#M963824</guid>
      <dc:creator />
      <dc:date>2015-10-20T12:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average 30 last days for each date selected</title>
      <link>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959979#M963825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you verify if this expression isn't per chance giving the same results? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see no reason why your outer aggregation function &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({1} .... ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should not actually be written as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Application date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;"&amp;gt;=$(vMinDate)&amp;lt;$(vMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DealValo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;={1}&amp;gt;} ....)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The inner scope inside your count is restricted, so reasonably the outer scope of your average should follow suit. You'll likely get the same results from both, I'm simply trying to promote a principal of syntax implementation that works in all scenarios - i.e. something that could be called "Best Practice". My version will likely perform marginally better, as the outer aggregation scope is now unnecessarily wide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 13:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-30-last-days-for-each-date-selected/m-p/959979#M963825</guid>
      <dc:creator>JonasValleskog</dc:creator>
      <dc:date>2015-10-20T13:13:36Z</dc:date>
    </item>
  </channel>
</rss>

