<?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 RangeAvg - Above problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380489#M571781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dear QV Community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with an expression that has the following formula in a line graph from a Bar/Line&amp;nbsp; Graph Object &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;IF (Año=Year(Today()) AND Mes=MONTH(Today())&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt; /&lt;/P&gt;&lt;P&gt; RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)*90&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="20557" class="jive-image-thumbnail jive-image" onclick="" alt="BarLine_Graph.png" src="https://community.qlik.com/legacyfs/online/20557_BarLine_Graph.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the graph the information is up to Aug 2012 for the bar graph, but the line graph corresponding to the formula above comes up to Oct 2012&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2012 17:48:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-23T17:48:52Z</dc:date>
    <item>
      <title>RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380489#M571781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dear QV Community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with an expression that has the following formula in a line graph from a Bar/Line&amp;nbsp; Graph Object &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;IF (Año=Year(Today()) AND Mes=MONTH(Today())&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt; /&lt;/P&gt;&lt;P&gt; RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)*90&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="20557" class="jive-image-thumbnail jive-image" onclick="" alt="BarLine_Graph.png" src="https://community.qlik.com/legacyfs/online/20557_BarLine_Graph.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the graph the information is up to Aug 2012 for the bar graph, but the line graph corresponding to the formula above comes up to Oct 2012&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 17:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380489#M571781</guid>
      <dc:creator />
      <dc:date>2012-08-23T17:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380490#M571782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is displaying correctly. The Rangeavg is taking 2 rows before the current and the current row. for sep you are getting the totals of Jul, Ago, and Sep. &lt;/P&gt;&lt;P&gt;Oct is giving you Ago,Sep, and Oct&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 18:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380490#M571782</guid>
      <dc:creator />
      <dc:date>2012-08-23T18:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380491#M571783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok marcsliving i know this but i need some solution over this issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 19:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380491#M571783</guid>
      <dc:creator />
      <dc:date>2012-08-23T19:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380492#M571784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are your date fields linked in your data model? I am assuming that you can have months with no data linked correct? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way could be to use an if statment to return null if the month is greater than month(today()) so something like this. You would then be able to check suppress nulls under dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(MONTH(Yourdatefield)&amp;lt;=MONTH(TODAY()),&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;IF (Año=Year(Today()) AND Mes=MONTH(Today())&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt; /&lt;/P&gt;&lt;P&gt; RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)*90)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380492#M571784</guid>
      <dc:creator />
      <dc:date>2012-08-24T12:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380493#M571785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the formula &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;IF(MONTH(Yourdatefield)&amp;lt;=MONTH(TODAY()),&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;(&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;IF (Año=Year(Today()) AND Mes=MONTH(Today())&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;/&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;)&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;)*90)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;and the QlikView is blocked (Not Responding).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;And i use the calendar in FlagMatrix Method for this reason i use the Flag Base=1 that is a flag for selectons in time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380493#M571785</guid>
      <dc:creator />
      <dc:date>2012-08-24T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380494#M571786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try doing this on the script level. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;IF((Yourdatefield)&amp;lt;=(TODAY()), Month(Yourdatefield)) as Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;This should make it so it will not pull any date greater than today for this month field. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380494#M571786</guid>
      <dc:creator />
      <dc:date>2012-08-24T12:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380495#M571787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This option is not viable because I have records with dates greater than today&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380495#M571787</guid>
      <dc:creator />
      <dc:date>2012-08-24T12:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380496#M571788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I guess I will try to understand your original formula a bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; From what I understand is that if the chart is on the current month and current year, use this formula:&lt;/P&gt;&lt;P&gt; RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;otherwise use this formula:&lt;/P&gt;&lt;P&gt;RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt; /&lt;/P&gt;&lt;P&gt; RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if you add one more part to that first IF statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;IF (Año=Year(Today()) AND Mes=MONTH(Today())&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto),Año={$(=Year(Today()))},Mes={$(=MONTH(Today()))},Día={$(=if(getselectedcount(Día)&amp;gt;0,Día,DAY(today())))}&amp;gt;} [Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;,IF(Año=Year(Today()) AND Mes&amp;lt;MONTH(Today())&lt;/P&gt;&lt;P&gt;,RangeAvg(Above(sum({&amp;lt;Base={1},$(vIgnoraProducto)&amp;gt;}[Valor total cartera]),0,3))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;RangeSum(Above(sum({&amp;lt;Base = {1}&amp;gt;} [Valor ventas]),0,3))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)*90&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:06:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380496#M571788</guid>
      <dc:creator />
      <dc:date>2012-08-24T13:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg - Above problem</title>
      <link>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380497#M571789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/marcsliving" id="jive-596334081101195691744" style="background-color: #d6f5b9; font-size: 12px; color: #007fc0; font-weight: bold; font-family: Arial; text-align: center;"&gt;marcsliving&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this option works fine Thanks !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/RangeAvg-Above-problem/m-p/380497#M571789</guid>
      <dc:creator />
      <dc:date>2012-08-24T13:38:04Z</dc:date>
    </item>
  </channel>
</rss>

