<?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( Aggr( not working in line chart with date range in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2488043#M101618</link>
    <description>&lt;P&gt;Hello Qlik Community,&lt;/P&gt;
&lt;P&gt;I can't seem to get the RangeAvg(Above working in a line chart, it is producing a blank chart with the expression below:&lt;/P&gt;
&lt;P&gt;Here is the expression:&lt;/P&gt;
&lt;P&gt;// Rolling Average - 7 Calculation for Prior Period with Proper Date Handling&lt;BR /&gt;IF(vComparisonPeriod = 'Prior Period',&lt;BR /&gt;Num(RangeAvg(Above(Aggr(&lt;/P&gt;
&lt;P&gt;IF(StopDate &amp;gt;= Date(Min([StopDate]) - (Max([StopDate]) - Min([StopDate]) + 1), 'M/D/YYYY') AND StopDate &amp;lt;= Date(Min([StopDate]) - 1, 'M/D/YYYY'), [$(vMeasureSelector3)]),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date),1, 7)),$(vMeasureSelector3Format) // Apply the formatting&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have it working with the filtered dates using this expression:&lt;/P&gt;
&lt;P&gt;IF(vAggregationType = 'Rolling Average - 7',&lt;BR /&gt;Num(IF(Sum(Aggr(IF([$(vMeasureSelector3)] &amp;lt;&amp;gt; 0, RangeAvg(Above([$(vMeasureSelector3)], 0, 7))),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date&lt;BR /&gt;)) &amp;lt;&amp;gt; 0,&lt;/P&gt;
&lt;P&gt;Sum(Aggr(IF([$(vMeasureSelector3)] &amp;lt;&amp;gt; 0, RangeAvg(Above([$(vMeasureSelector3)], 0, 7))),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date&lt;BR /&gt;)),Null()&lt;BR /&gt;),$(vMeasureSelector3Format) // Apply the formatting&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;Thanks/Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Oct 2024 17:26:01 GMT</pubDate>
    <dc:creator>ASC-Mike</dc:creator>
    <dc:date>2024-10-19T17:26:01Z</dc:date>
    <item>
      <title>RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2488043#M101618</link>
      <description>&lt;P&gt;Hello Qlik Community,&lt;/P&gt;
&lt;P&gt;I can't seem to get the RangeAvg(Above working in a line chart, it is producing a blank chart with the expression below:&lt;/P&gt;
&lt;P&gt;Here is the expression:&lt;/P&gt;
&lt;P&gt;// Rolling Average - 7 Calculation for Prior Period with Proper Date Handling&lt;BR /&gt;IF(vComparisonPeriod = 'Prior Period',&lt;BR /&gt;Num(RangeAvg(Above(Aggr(&lt;/P&gt;
&lt;P&gt;IF(StopDate &amp;gt;= Date(Min([StopDate]) - (Max([StopDate]) - Min([StopDate]) + 1), 'M/D/YYYY') AND StopDate &amp;lt;= Date(Min([StopDate]) - 1, 'M/D/YYYY'), [$(vMeasureSelector3)]),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date),1, 7)),$(vMeasureSelector3Format) // Apply the formatting&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have it working with the filtered dates using this expression:&lt;/P&gt;
&lt;P&gt;IF(vAggregationType = 'Rolling Average - 7',&lt;BR /&gt;Num(IF(Sum(Aggr(IF([$(vMeasureSelector3)] &amp;lt;&amp;gt; 0, RangeAvg(Above([$(vMeasureSelector3)], 0, 7))),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date&lt;BR /&gt;)) &amp;lt;&amp;gt; 0,&lt;/P&gt;
&lt;P&gt;Sum(Aggr(IF([$(vMeasureSelector3)] &amp;lt;&amp;gt; 0, RangeAvg(Above([$(vMeasureSelector3)], 0, 7))),&lt;BR /&gt;[$(vDimensionSelector)], StopDate.autoCalendar.Date&lt;BR /&gt;)),Null()&lt;BR /&gt;),$(vMeasureSelector3Format) // Apply the formatting&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;Thanks/Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 17:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2488043#M101618</guid>
      <dc:creator>ASC-Mike</dc:creator>
      <dc:date>2024-10-19T17:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2488049#M101619</link>
      <description>&lt;P&gt;sample data and expected output pls.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 19:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2488049#M101619</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-10-19T19:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490862#M102025</link>
      <description>&lt;P&gt;Sorry for the delay as I had to put his together.&amp;nbsp; Sample app attached.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create the test case:&lt;/P&gt;
&lt;P&gt;Filter date range for 9/3/24 to 9/30/24&lt;/P&gt;
&lt;P&gt;Filter Comparison Period as Prior Period (this actually becomes 8/6/24 to 9/2/24 and shows at the top of app)&lt;/P&gt;
&lt;P&gt;Filter Aggregation type as Rolling average - 7&lt;/P&gt;
&lt;P&gt;Filter Dimension as AGGREGATE&lt;/P&gt;
&lt;P&gt;Filter Y Axis Metric as OFD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The line chart with smooth out the current period for the correct date range 9/2 to 9/30, but the prior period is not working properly as it is including both the prior period dates and the filtered dates.&amp;nbsp;&amp;nbsp; I do use the dual function in the dimension so the dates on the X axis are blended for the current period and prior period which seems to work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All other test cases for the app work except for the one described above.&amp;nbsp;&amp;nbsp; FYI... The line chart is actually two charts that swap depending on the dimension selector.&lt;/P&gt;
&lt;P&gt;Current period dates are bleeding into the prior period expression:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ASCMike_0-1730817426303.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/173828i51AAF93985862007/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ASCMike_0-1730817426303.png" alt="ASCMike_0-1730817426303.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 14:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490862#M102025</guid>
      <dc:creator>ASC-Mike</dc:creator>
      <dc:date>2024-11-05T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490871#M102026</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/232277"&gt;@ASC-Mike&lt;/a&gt;&amp;nbsp; Cannot see line chart as it is vizlib line chart. Can you convert it to native line chart and share it?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 15:01:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490871#M102026</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-11-05T15:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490934#M102030</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp; here you go with standard line charts.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 20:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490934#M102030</guid>
      <dc:creator>ASC-Mike</dc:creator>
      <dc:date>2024-11-05T20:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: RangeAvg(Above( Aggr( not working in line chart with date range</title>
      <link>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490950#M102035</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336" target="_blank"&gt;@Kushal_Chawda&lt;/A&gt;&amp;nbsp; I saw an issue where I left a vizlib chart in there.&amp;nbsp; Here is the corrected copy. Thanks/Mike&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 21:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/RangeAvg-Above-Aggr-not-working-in-line-chart-with-date-range/m-p/2490950#M102035</guid>
      <dc:creator>ASC-Mike</dc:creator>
      <dc:date>2024-11-05T21:23:01Z</dc:date>
    </item>
  </channel>
</rss>

