<?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: Aggr expression to solve dynamic Date selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426200#M567703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not clear to me what you want exactly. You can't get the max dates and the counts per category in one table. You'll need two tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that a user selects one or more dates and wants to see the max dates of the selected dates per Field2 and the count per category where the date is smaller or equal to the max date of the selected dates. See the attached qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's not what you need you'll have to explain what you need. You could use excel to make example tables the way you want the result to look. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2012 20:20:19 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2012-11-12T20:20:19Z</dc:date>
    <item>
      <title>Aggr expression to solve dynamic Date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426199#M567702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need help with the following problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with the following format:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24991" class="jive-image" alt="Image.png" src="https://community.qlik.com/legacyfs/online/24991_Image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we need is the following:&lt;/P&gt;&lt;P&gt;- Get the max DATE for each Field2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Aggr (Max (Date), Field2).&lt;/P&gt;&lt;P&gt;- The result of the above, do a count distributed by Field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Field3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count&lt;/P&gt;&lt;P&gt;Category1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;Category2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;Category3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Field3&lt;/P&gt;&lt;P&gt;Expression: Aggr(Max(Fecha), Field2)&amp;nbsp; -- and a count by Field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I need resolve this in object level because the field DATE is select&amp;nbsp; dynamic by the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach a QlikView document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Guzmán&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 18:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426199#M567702</guid>
      <dc:creator />
      <dc:date>2012-11-12T18:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr expression to solve dynamic Date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426200#M567703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not clear to me what you want exactly. You can't get the max dates and the counts per category in one table. You'll need two tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that a user selects one or more dates and wants to see the max dates of the selected dates per Field2 and the count per category where the date is smaller or equal to the max date of the selected dates. See the attached qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's not what you need you'll have to explain what you need. You could use excel to make example tables the way you want the result to look. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 20:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426200#M567703</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-12T20:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr expression to solve dynamic Date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426201#M567704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert thank you very much for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I adjusted based on your qvw, and then explain a particular case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="24993" __jive_id="24993" class="jive-image" alt="Image.png" src="https://community.qlik.com/legacyfs/online/24993_Image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the previous image, select the first 4 values from Table1. In Table2 I have records filtered by that selection.&lt;/P&gt;&lt;P&gt;As can you see, each Field2 value may correspond to several Date values ​​and Field3 values.&lt;/P&gt;&lt;P&gt;I need only count Field2 values ​​for which Date value is maximum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;In the example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;123456 - 06/10/2012&lt;/P&gt;&lt;P&gt;456123 - 09/10/2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then link these values ​​with the corresponding Field3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;06/10/2012 - 123456 - Category3&lt;/P&gt;&lt;P&gt;09/10/2012 - 456123 - Category1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally get a count by Field3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Category1 - 1&lt;/P&gt;&lt;P&gt;Category3 - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is a count of Field2 distributed by Field3, but taking only the max Date value for each Field2 value and its corresponding Field3 value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a little hard to explain, I hope I have helped. I attached the qvw file and a Excel with some examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;Guzmán&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 01:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression-to-solve-dynamic-Date-selection/m-p/426201#M567704</guid>
      <dc:creator />
      <dc:date>2012-11-13T01:44:26Z</dc:date>
    </item>
  </channel>
</rss>

