<?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: Max # of Days Open if conditions met in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316107#M832447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;assuming you want the result for each manger you can use this &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;max(&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;{&amp;lt;StateValue={"Active"}, IncidentDate={"&amp;gt;=01/01/2016&amp;lt;=12/31/2017"}&amp;gt;}&lt;/SPAN&gt;aggr(Today()-IncidentDate,&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;IncidentiD&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jun 2017 18:47:45 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2017-06-19T18:47:45Z</dc:date>
    <item>
      <title>Max # of Days Open if conditions met</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316105#M832443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have CaseManagers, and each CaseManager has Incidents assigned to them.&amp;nbsp; Each Incident has IncidentID and IncidentDate, which is the date the Incident was opened.&amp;nbsp; We can get the # of days each Incident is open by&lt;SPAN style="color: #000000; font-family: Calibri; background-color: #ffff00;"&gt; &lt;SPAN style="mso-bidi-language: AR-SA; mso-fareast-language: JA; mso-bidi-font-family: 'Times New Roman'; mso-highlight: yellow; mso-ascii-theme-font: minor-latin; line-height: 107%; color: #000000; background: yellow; font-size: 11pt; mso-hansi-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; font-family: 'Calibri',sans-serif; mso-fareast-font-family: 'MS Mincho'; mso-bidi-theme-font: minor-bidi;"&gt;Today()-IncidentDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-bidi-language: AR-SA; mso-fareast-language: JA; mso-bidi-font-family: 'Times New Roman'; background-color: #ffff00; mso-highlight: yellow; mso-ascii-theme-font: minor-latin; line-height: 107%; color: #000000; background: yellow; font-size: 11pt; mso-hansi-theme-font: minor-latin; mso-ansi-language: EN-US; font-family: 'Calibri',sans-serif; mso-fareast-theme-font: minor-fareast; mso-fareast-font-family: 'MS Mincho'; mso-bidi-theme-font: minor-bidi;"&gt;For each CaseManager, I can get the maximum # of days an Incident is open by &lt;SPAN style="mso-bidi-language: AR-SA; mso-fareast-language: JA; mso-bidi-font-family: 'Times New Roman'; mso-highlight: yellow; mso-ascii-theme-font: minor-latin; line-height: 107%; color: #000000; background: yellow; font-size: 11pt; mso-hansi-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; font-family: 'Calibri',sans-serif; mso-fareast-font-family: 'MS Mincho'; mso-bidi-theme-font: minor-bidi;"&gt;Max(Today()-IncidentDate)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="mso-bidi-language: AR-SA; mso-fareast-language: JA; mso-bidi-font-family: 'Times New Roman'; background-color: #ffff00; mso-highlight: yellow; mso-ascii-theme-font: minor-latin; line-height: 107%; color: #000000; background: yellow; font-size: 11pt; mso-hansi-theme-font: minor-latin; mso-ansi-language: EN-US; font-family: 'Calibri',sans-serif; mso-fareast-theme-font: minor-fareast; mso-fareast-font-family: 'MS Mincho'; mso-bidi-theme-font: minor-bidi;"&gt;Now we want to get the max # of days open of the oldest Incident for each CaseManager only is the Incident has "Active" status and only if IncidentDate is in 2016 to 2017 without having any filters such as IncidentYear or StateValue.&amp;nbsp; I can count the # of Incidents successfully by the below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; background: yellow; font-size: 12pt; font-family: Calibri;"&gt;Count({&amp;lt;StateValue={"Active"}, IncidentDate={"&amp;gt;=01/01/2016&amp;lt;=12/31/2017"}&amp;gt;}IncidentID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; background: yellow; font-size: 12pt; font-family: Calibri;"&gt;I tried the below to get the Max # of days if these conditions are met:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; background: yellow; font-size: 12pt; font-family: Calibri;"&gt;Not Working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 8pt;"&gt;&lt;SPAN style="color: #000000; background: yellow; font-size: 12pt; font-family: Calibri;"&gt;IF({&amp;lt;StateValue={"Active"}, IncidentDate={"&amp;gt;=01/01/2016&amp;lt;=12/31/2017"}&amp;gt;}Max(Today()-IncidentDate))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Please tell me how I can get this to work.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316105#M832443</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max # of Days Open if conditions met</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316106#M832445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure, but may be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max({&amp;lt;StateValue={"Active"}, IncidentDate={"&amp;gt;=01/01/2016&amp;lt;=12/31/2017"}&amp;gt;} Today()-IncidentDate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 18:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316106#M832445</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-19T18:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Max # of Days Open if conditions met</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316107#M832447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;assuming you want the result for each manger you can use this &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;max(&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;{&amp;lt;StateValue={"Active"}, IncidentDate={"&amp;gt;=01/01/2016&amp;lt;=12/31/2017"}&amp;gt;}&lt;/SPAN&gt;aggr(Today()-IncidentDate,&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 16px; background-color: #ffff00;"&gt;IncidentiD&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 18:47:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316107#M832447</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2017-06-19T18:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max # of Days Open if conditions met</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316108#M832449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much!!!!!! This worked perfectly. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 18:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316108#M832449</guid>
      <dc:creator />
      <dc:date>2017-06-19T18:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Max # of Days Open if conditions met</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316109#M832451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one returned no value for all CaseManagers.&amp;nbsp; Might have been something in the pivot set up I already had.&amp;nbsp; But the previous one worked for me.&amp;nbsp; Thanks for your reply. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 19:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-Days-Open-if-conditions-met/m-p/1316109#M832451</guid>
      <dc:creator />
      <dc:date>2017-06-19T19:00:45Z</dc:date>
    </item>
  </channel>
</rss>

