<?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 Aggregate sum values by ID and max available date per ID in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggregate-sum-values-by-ID-and-max-available-date-per-ID/m-p/2418848#M95455</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to sum values for different store ID that might have a different max date for each.&lt;/P&gt;
&lt;P&gt;For instance, I could have 10 stores with a max date on 13/02/2024 but another store where the max date is 10/02/2024. In this case I must sum every value for these 10 stores (considering the 13/02) plus the special store where the date is 10/02.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was using the following expression and it was working until we had a store that didn't open these days:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;key_calendario = {"$(=Floor(Max(projecao_faturamento_data)))"}&amp;gt;} projecao_faturamento_dia)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to tweak around using aggr, but without sucess. Does anyone have a clue on how to achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: the value is gonna be shown in a KPI, not a table, that why it must be aggregated to work (I think)&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 15:06:55 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-02-14T15:06:55Z</dc:date>
    <item>
      <title>Aggregate sum values by ID and max available date per ID</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-sum-values-by-ID-and-max-available-date-per-ID/m-p/2418848#M95455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to sum values for different store ID that might have a different max date for each.&lt;/P&gt;
&lt;P&gt;For instance, I could have 10 stores with a max date on 13/02/2024 but another store where the max date is 10/02/2024. In this case I must sum every value for these 10 stores (considering the 13/02) plus the special store where the date is 10/02.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was using the following expression and it was working until we had a store that didn't open these days:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;key_calendario = {"$(=Floor(Max(projecao_faturamento_data)))"}&amp;gt;} projecao_faturamento_dia)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to tweak around using aggr, but without sucess. Does anyone have a clue on how to achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: the value is gonna be shown in a KPI, not a table, that why it must be aggregated to work (I think)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-sum-values-by-ID-and-max-available-date-per-ID/m-p/2418848#M95455</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-02-14T15:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate sum values by ID and max available date per ID</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-sum-values-by-ID-and-max-available-date-per-ID/m-p/2418858#M95457</link>
      <description>&lt;P&gt;Ok, got it with FirstSortedValue. &lt;/P&gt;
&lt;P&gt;Sum(Aggr(FirstSortedValue(projecao_faturamento_dia, -projecao_faturamento_data), key_cnpj))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the help of this thread:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Help-with-Max-and-AGGR-Function/td-p/1820575" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/Help-with-Max-and-AGGR-Function/td-p/1820575&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:23:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-sum-values-by-ID-and-max-available-date-per-ID/m-p/2418858#M95457</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-02-14T15:23:37Z</dc:date>
    </item>
  </channel>
</rss>

