<?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: Avoid filter on agregate funtcion in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826222#M67943</link>
    <description>&lt;P&gt;We want an expresion (I understand that that expression must be an aggr one) that shows previous 12 months count for a field for every shown year-month.&lt;/P&gt;&lt;P&gt;But with some "special" features&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;this aggr expression must be independent of year-month filtering&lt;/LI&gt;&lt;LI&gt;The table only shows months of current year.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;These are correct values we expect (using &lt;FONT color="#3366FF"&gt;Sum({&amp;lt;[Año-Mes]=&amp;gt;}Aggr(Rangesum(Above(count({&amp;lt;[Año-Mes]=&amp;gt;}[ID Llamada Entrante]),0,12)), ([Año-Mes], (Numeric, Ascending)) ))&lt;FONT color="#000000"&gt; and&amp;nbsp;&lt;/FONT&gt;IF(year([Año-Mes])=Year(today()),[Año-Mes],null())&lt;FONT color="#000000"&gt; in dimension:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggr 4.PNG" style="width: 892px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59582i46EA3D86433D474D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr 4.PNG" alt="Aggr 4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But it has a problem. If we filter by [Año-Mes]&amp;nbsp; = 2021-Jun in order to show only Jan to Jun data, table doesn't change.&lt;/P&gt;&lt;P&gt;So, we need an expression with a rolling modifier (i suppose) that can show theese values but only for 2021-Jan to year-month_used_as_filter. I mean, I we apply [Año-Mes] = 2021-Jun filter, table must show exatly first 6 rows, without any changes in column values.&lt;/P&gt;&lt;P&gt;The expression we are using doesn't have this behavior, because its values change when we use year-month filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alonso Torres.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Aug 2021 07:23:25 GMT</pubDate>
    <dc:creator>Gestion-PSD</dc:creator>
    <dc:date>2021-08-03T07:23:25Z</dc:date>
    <item>
      <title>Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1825738#M67880</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;We're facing an undesirable behavior in an agregation funcion working with filters.&lt;/P&gt;&lt;P&gt;I'll try to explain myself with screenshots and expresions.&lt;/P&gt;&lt;P&gt;We have a table with &lt;FONT color="#000000"&gt;&lt;FONT color="#333399"&gt;YearMonth&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;dimension&amp;nbsp; and an aggr expresion:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Sum({&amp;lt;$(vSetRolling12Modifier)&amp;gt;}Aggr(Rangesum(Above(count({&amp;lt;$(vSetRolling12Modifier)&amp;gt;}[ID Llamada Entrante]),0,12)), ([Año-Mes], (Numeric, Ascending)) ))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;with this expression we want to show, for every yearmonth, the number of "ID Llamada Entrante" in that month and previous 11&amp;nbsp; (for 2021-june, the amount of 2020-july -&amp;gt; 2021-june; for 2021-may, the amount of 2020-june -&amp;gt; 2021-may)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Where&amp;nbsp;&lt;FONT color="#333399"&gt;$(vSetRolling12Modifier) =&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#333399"&gt;[Date]=,[Day]=,[Weekday]=,[Year]=,[Month]=,[Quarter]=,[YearMonth]=,&lt;BR /&gt;[_MonthSerial] = {"&amp;gt;=$(=Max({1&amp;lt;$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)&amp;gt;} [_MonthSerial]) - 11)&amp;lt;=$(=Max({1&amp;lt;$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldList_)&amp;gt;} [_MonthSerial]))"}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;We use &lt;FONT color="#333399"&gt;vSetRolling12Modifier&lt;/FONT&gt; to avoid calendar filters and to take into account the previous 12 months&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It works fine when we don't apply filter (data has been validated):&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Aggr 1.PNG" style="width: 281px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59475iA58A1F8593BDC865/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr 1.PNG" alt="Aggr 1.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;But when we apply a YearMonth filter, previous months data changes, wich is no correct.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Aggr 2.PNG" style="width: 274px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59476iF5A64691096A2862/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr 2.PNG" alt="Aggr 2.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Can someone help us to reach the correct expression?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks in advance.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Alonso Torres.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 10:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1825738#M67880</guid>
      <dc:creator>Gestion-PSD</dc:creator>
      <dc:date>2021-07-30T10:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1825850#M67892</link>
      <description>&lt;P&gt;I think you may need the modifier inside the Aggr() as well.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Sum({&amp;lt;$(vSetRolling12Modifier)&amp;gt;}Aggr({&lt;STRONG&gt;&amp;lt;$(vSetRolling12Modifier)&amp;gt;}&lt;/STRONG&gt;Rangesum(Above(count({&amp;lt;$(vSetRolling12Modifier)&amp;gt;}[ID Llamada Entrante]),0,12)), ([Año-Mes], (Numeric, Ascending)) ))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 00:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1825850#M67892</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-07-31T00:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826012#M67915</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Thanks for your post, but it didn't work.&lt;/P&gt;&lt;P&gt;I think maybe the modifier isn't correct for what we want.&lt;/P&gt;&lt;P&gt;I attach here a simplified copy of our app for you, community, to test it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What we want is to see in "Nb inbound calls..." column the sum of count(ID Llamada Entrante) for the month plus previous 11 months. But showing only current year.&lt;/P&gt;&lt;P&gt;I.E., for 2021-jun, first column must show the count of ID Llamada Entrante since 2020-jul to 2021-jun, regardless data filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This image shows what we have and what we want:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggr 3.PNG" style="width: 670px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59528i45A2F340DA12AB47/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr 3.PNG" alt="Aggr 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alonso Torres&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 10:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826012#M67915</guid>
      <dc:creator>Gestion-PSD</dc:creator>
      <dc:date>2021-08-02T10:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826055#M67920</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77286"&gt;@Gestion-PSD&lt;/a&gt;&amp;nbsp; you need to add the modifier in other expression as well. Then go to add-on and uncheck include zero values option&lt;/P&gt;&lt;P&gt;Count({&amp;lt;$(vSetRolling12Modifier)&amp;gt;}[ID Llamada Entrante])&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 11:22:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826055#M67920</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-08-02T11:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826079#M67924</link>
      <description>&lt;P&gt;Thanks, Kushal, but this isn't the aim of the post.&lt;/P&gt;&lt;P&gt;In the real app, [ID Llamada Entrante] column doesn't appear. I put it in the image and exaple app to show the values that must be aggregated in [&lt;SPAN&gt;Nb inbound calls] column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We want to know how to rewrite [Nb inbound calls] expression to be independent of date filtering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alonso Torres.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 13:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826079#M67924</guid>
      <dc:creator>Gestion-PSD</dc:creator>
      <dc:date>2021-08-02T13:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826109#M67930</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77286"&gt;@Gestion-PSD&lt;/a&gt;&amp;nbsp; still not clear.. So when you don't have any filter selection, you want to show last 12 months period and each period will have values aggregated for last 12 months? If yes, then any other period filter selection should not affect this view?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 14:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826109#M67930</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-08-02T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826222#M67943</link>
      <description>&lt;P&gt;We want an expresion (I understand that that expression must be an aggr one) that shows previous 12 months count for a field for every shown year-month.&lt;/P&gt;&lt;P&gt;But with some "special" features&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;this aggr expression must be independent of year-month filtering&lt;/LI&gt;&lt;LI&gt;The table only shows months of current year.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;These are correct values we expect (using &lt;FONT color="#3366FF"&gt;Sum({&amp;lt;[Año-Mes]=&amp;gt;}Aggr(Rangesum(Above(count({&amp;lt;[Año-Mes]=&amp;gt;}[ID Llamada Entrante]),0,12)), ([Año-Mes], (Numeric, Ascending)) ))&lt;FONT color="#000000"&gt; and&amp;nbsp;&lt;/FONT&gt;IF(year([Año-Mes])=Year(today()),[Año-Mes],null())&lt;FONT color="#000000"&gt; in dimension:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggr 4.PNG" style="width: 892px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59582i46EA3D86433D474D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggr 4.PNG" alt="Aggr 4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But it has a problem. If we filter by [Año-Mes]&amp;nbsp; = 2021-Jun in order to show only Jan to Jun data, table doesn't change.&lt;/P&gt;&lt;P&gt;So, we need an expression with a rolling modifier (i suppose) that can show theese values but only for 2021-Jan to year-month_used_as_filter. I mean, I we apply [Año-Mes] = 2021-Jun filter, table must show exatly first 6 rows, without any changes in column values.&lt;/P&gt;&lt;P&gt;The expression we are using doesn't have this behavior, because its values change when we use year-month filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alonso Torres.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 07:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826222#M67943</guid>
      <dc:creator>Gestion-PSD</dc:creator>
      <dc:date>2021-08-03T07:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid filter on agregate funtcion</title>
      <link>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826853#M68014</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;Finally we had solved our expression problem. Briefly, We did tree modifications:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;we modified the limit of data load to load curren year and two year before. (now, 2019 to 2021)&lt;/LI&gt;&lt;LI&gt;we also modified year-month dimension on table to limit showed yearmonths (now, previous year - january to current year-month). We add Year dimension an limited it.&lt;UL&gt;&lt;LI&gt;year dimension is&amp;nbsp; &lt;FONT color="#3366FF"&gt;=IF(year([Year-Month])&amp;gt;=Year(today())-1,[Year],null())&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;finally, we modified the expression to rolling over all year to current yearmonth maintaining year-month ignoring in SetAnalysis.&lt;UL&gt;&lt;LI&gt;Expression now is:&amp;nbsp;&lt;FONT color="#3366FF"&gt;Sum({&amp;lt;DateField={"&amp;gt;=$(=yearstart(max(DateField),-2))&amp;lt;=$(=max(DateField))"},Month=,Year=,[Year-Month]=&amp;gt;}Aggr(Rangesum(Above(count({&amp;lt;DateField={"&amp;gt;=$(=yearstart(max(DateField),-2))&amp;lt;=$(=max(DateField))"},Month=,Year=,[Year-Month]=&amp;gt;}[ID Llamada Entrante]),0,12)), ([Year-Month], (Numeric, Ascending)) ))&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Those modifications makes our table to show desired data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks folks for your support!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alonso Torres.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 12:17:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Avoid-filter-on-agregate-funtcion/m-p/1826853#M68014</guid>
      <dc:creator>Gestion-PSD</dc:creator>
      <dc:date>2021-08-05T12:17:35Z</dc:date>
    </item>
  </channel>
</rss>

