<?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 MAX date within a date range following condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/MAX-date-within-a-date-range-following-condition/m-p/2002502#M83031</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to return the last (Max) event datetime which I can do using the following set analysis&lt;/P&gt;
&lt;P&gt;Max({$&amp;lt;[Event Type Id]={'New'}&amp;gt;}[Event Time])&lt;/P&gt;
&lt;P&gt;But if this datetime is after the "end datetime" I want the last event datetime within the range between Start - End Datetime. See below example data. As you can see the "Max Event time" is after "End Datetime". Therefore I'd like to return the last event time between the start and end times.&lt;/P&gt;
&lt;TABLE width="596"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="56"&gt;ID&lt;/TD&gt;
&lt;TD width="135"&gt;Start DateTime&lt;/TD&gt;
&lt;TD width="135"&gt;End Datetime&lt;/TD&gt;
&lt;TD width="135"&gt;Min Event Time&lt;/TD&gt;
&lt;TD width="135"&gt;Max Event Time&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;111111&lt;/TD&gt;
&lt;TD&gt;11/10/2022 14:01&lt;/TD&gt;
&lt;TD&gt;11/10/2022 20:00&lt;/TD&gt;
&lt;TD&gt;11/10/2022 14:40&lt;/TD&gt;
&lt;TD&gt;04/11/2022 15:46&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this makes sense. Any help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2022 14:49:13 GMT</pubDate>
    <dc:creator>PhilMusgrave</dc:creator>
    <dc:date>2022-11-09T14:49:13Z</dc:date>
    <item>
      <title>MAX date within a date range following condition</title>
      <link>https://community.qlik.com/t5/App-Development/MAX-date-within-a-date-range-following-condition/m-p/2002502#M83031</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to return the last (Max) event datetime which I can do using the following set analysis&lt;/P&gt;
&lt;P&gt;Max({$&amp;lt;[Event Type Id]={'New'}&amp;gt;}[Event Time])&lt;/P&gt;
&lt;P&gt;But if this datetime is after the "end datetime" I want the last event datetime within the range between Start - End Datetime. See below example data. As you can see the "Max Event time" is after "End Datetime". Therefore I'd like to return the last event time between the start and end times.&lt;/P&gt;
&lt;TABLE width="596"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="56"&gt;ID&lt;/TD&gt;
&lt;TD width="135"&gt;Start DateTime&lt;/TD&gt;
&lt;TD width="135"&gt;End Datetime&lt;/TD&gt;
&lt;TD width="135"&gt;Min Event Time&lt;/TD&gt;
&lt;TD width="135"&gt;Max Event Time&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;111111&lt;/TD&gt;
&lt;TD&gt;11/10/2022 14:01&lt;/TD&gt;
&lt;TD&gt;11/10/2022 20:00&lt;/TD&gt;
&lt;TD&gt;11/10/2022 14:40&lt;/TD&gt;
&lt;TD&gt;04/11/2022 15:46&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this makes sense. Any help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 14:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/MAX-date-within-a-date-range-following-condition/m-p/2002502#M83031</guid>
      <dc:creator>PhilMusgrave</dc:creator>
      <dc:date>2022-11-09T14:49:13Z</dc:date>
    </item>
  </channel>
</rss>

