<?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 Retrieve a value based on two dates comparison using Set Analysis in a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Retrieve-a-value-based-on-two-dates-comparison-using-Set/m-p/708779#M537801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im stuck with this issue for over a month, as my questions says I want to retrieve a value based on two dates comparison using Set Analysis in a table, in detail, I want to get a value [Avance Esperado]&amp;nbsp; from the Max([Fecha de Avance])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the expression&lt;/P&gt;&lt;P&gt;=Max({$&amp;lt;[Fecha de Avance] = {"$(=Max([Fecha de Avance]))"}&amp;gt;} [Avance Esperado])&lt;/P&gt;&lt;P&gt;The row "Avance esperado" shows value only where the date matches with the maximum date in the whole document, not per [Proyecto], as you can see in the image below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Table.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67769_Table.png" style="width: 620px; height: 260px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use instead this expression:&lt;/P&gt;&lt;P&gt;=Max({$&amp;lt;[Fecha de Avance] += {"$(=Max([Fecha de Avance]))"}&amp;gt;} [Avance Esperado])&lt;/P&gt;&lt;P&gt;The result seams to be right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Table2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67771_Table2.png" /&gt;&lt;/P&gt;&lt;P&gt;But if you check on the source document which is excel, you realize it is picking the maximum value for [Proyecto] but no with the matching maximum date:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Source.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67773_Source.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the value picked in [Avance Esperado] should be 87.50% as marked with blue, due the date 17/09/2014 is the maximum date for Janssen - Kronos project, instead it is picking 100% as marked in red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the qvw file, and the xlsx source file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me to solve this?&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 18:53:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-26T18:53:58Z</dc:date>
    <item>
      <title>Retrieve a value based on two dates comparison using Set Analysis in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-a-value-based-on-two-dates-comparison-using-Set/m-p/708779#M537801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im stuck with this issue for over a month, as my questions says I want to retrieve a value based on two dates comparison using Set Analysis in a table, in detail, I want to get a value [Avance Esperado]&amp;nbsp; from the Max([Fecha de Avance])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the expression&lt;/P&gt;&lt;P&gt;=Max({$&amp;lt;[Fecha de Avance] = {"$(=Max([Fecha de Avance]))"}&amp;gt;} [Avance Esperado])&lt;/P&gt;&lt;P&gt;The row "Avance esperado" shows value only where the date matches with the maximum date in the whole document, not per [Proyecto], as you can see in the image below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Table.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67769_Table.png" style="width: 620px; height: 260px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use instead this expression:&lt;/P&gt;&lt;P&gt;=Max({$&amp;lt;[Fecha de Avance] += {"$(=Max([Fecha de Avance]))"}&amp;gt;} [Avance Esperado])&lt;/P&gt;&lt;P&gt;The result seams to be right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Table2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67771_Table2.png" /&gt;&lt;/P&gt;&lt;P&gt;But if you check on the source document which is excel, you realize it is picking the maximum value for [Proyecto] but no with the matching maximum date:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Source.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67773_Source.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the value picked in [Avance Esperado] should be 87.50% as marked with blue, due the date 17/09/2014 is the maximum date for Janssen - Kronos project, instead it is picking 100% as marked in red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the qvw file, and the xlsx source file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me to solve this?&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 18:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-a-value-based-on-two-dates-comparison-using-Set/m-p/708779#M537801</guid>
      <dc:creator />
      <dc:date>2014-09-26T18:53:58Z</dc:date>
    </item>
  </channel>
</rss>

