<?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 Dynamic Max Date in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118212#M368903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a tricky requirement where I need help.&lt;/P&gt;&lt;P&gt;In my application I have different ReferenceNumbers. Each number is associated with different dates. Each date is associated with one or more records.&lt;/P&gt;&lt;P&gt;What I like to achieve: For each ReferenceNr the Max.Date should be selected. If one of the Records associated with this Max.Date is NULL, the result should be 0 otherwise 1. Besides, only those Records which are in Group 'A' should be included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like this:&lt;/P&gt;&lt;P&gt;=if( len(concat( {$&amp;lt;Group={'A'}, [Date]={"=date( max(Date), 'yyyyMMdd' )"} &amp;gt;}&amp;nbsp; trim(Record))) &amp;gt;0, 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this:&lt;/P&gt;&lt;P&gt;=if( len(concat( {$&amp;lt;Group={'A'}, [Date]={"=date(max(aggr(max({&amp;lt;Group={'A'}&amp;gt;}Date), ReferenzNr)), 'yyyyMMdd' )"} &amp;gt;}&amp;nbsp; trim(Record))) &amp;gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp; , 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work. I have to select ReferenceNr and the corresponding Max.Date in order to get the right result. (--&amp;gt;ExampleApp)&lt;/P&gt;&lt;P&gt;Is there a way to get the maximum date for each ReferenceNr in a Set Analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate your help!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lisa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2016 10:02:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-31T10:02:43Z</dc:date>
    <item>
      <title>Dynamic Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118212#M368903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a tricky requirement where I need help.&lt;/P&gt;&lt;P&gt;In my application I have different ReferenceNumbers. Each number is associated with different dates. Each date is associated with one or more records.&lt;/P&gt;&lt;P&gt;What I like to achieve: For each ReferenceNr the Max.Date should be selected. If one of the Records associated with this Max.Date is NULL, the result should be 0 otherwise 1. Besides, only those Records which are in Group 'A' should be included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like this:&lt;/P&gt;&lt;P&gt;=if( len(concat( {$&amp;lt;Group={'A'}, [Date]={"=date( max(Date), 'yyyyMMdd' )"} &amp;gt;}&amp;nbsp; trim(Record))) &amp;gt;0, 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this:&lt;/P&gt;&lt;P&gt;=if( len(concat( {$&amp;lt;Group={'A'}, [Date]={"=date(max(aggr(max({&amp;lt;Group={'A'}&amp;gt;}Date), ReferenzNr)), 'yyyyMMdd' )"} &amp;gt;}&amp;nbsp; trim(Record))) &amp;gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp; , 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work. I have to select ReferenceNr and the corresponding Max.Date in order to get the right result. (--&amp;gt;ExampleApp)&lt;/P&gt;&lt;P&gt;Is there a way to get the maximum date for each ReferenceNr in a Set Analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate your help!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lisa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 10:02:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118212#M368903</guid>
      <dc:creator />
      <dc:date>2016-08-31T10:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118213#M368904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Len(Trim(FirstSortedValue(Aggr(MinString(Record), ReferenzNr, Group, Date), -Aggr(Date, ReferenzNr, Group, Date)))) = 0, 0, 1) &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 10:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118213#M368904</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-31T10:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118214#M368905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;See this document, it will help you so much:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4249" title="https://community.qlik.com/docs/DOC-4249"&gt;https://community.qlik.com/docs/DOC-4249&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 12:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118214#M368905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-31T12:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118215#M368906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked... Thanks a lot!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 12:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Max-Date-in-Set-Analysis/m-p/1118215#M368906</guid>
      <dc:creator />
      <dc:date>2016-08-31T12:05:59Z</dc:date>
    </item>
  </channel>
</rss>

