<?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: set analysis based on date logic not working as coded in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-based-on-date-logic-not-working-as-coded/m-p/752794#M268259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got rid of the = in front of max() and it worked.&amp;nbsp; this below works:&lt;BR /&gt;sum({$&amp;lt; [DateType='Entry'], [Target Resolve Date Time]={"&amp;lt;=$(max([Calendar Date])+1)"} &amp;gt;} [Case Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had thought that expressions require the = in front of them when used in set analysis. I guess not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2015 16:02:18 GMT</pubDate>
    <dc:creator>dadumas</dc:creator>
    <dc:date>2015-03-05T16:02:18Z</dc:date>
    <item>
      <title>set analysis based on date logic not working as coded</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-based-on-date-logic-not-working-as-coded/m-p/752793#M268258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have set analysis coded on a variable below.&amp;nbsp; In a chart I have selections based on [Calendar Date]. [Entry Date] in the fact records join to [Calendar Date] in the calendar table.&amp;nbsp; I wish to limit my results to records where [Target Resolve Date Time] is less than or equal to the max [Calendar Date] selected from the calendar. I then use max([Calendar Date]) in my code to achieve this.&amp;nbsp; [Target Resolve Date Time] is a datetime attribute of the fact record and does not join to the calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below produces a correct result except that it does not take into account the needed Target Resolve Date logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[DateType={'Entry'}&amp;gt;} [Case Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below should work, but does not:&amp;nbsp; It produces a 0 result. I added the +1 to ensure that I get records to include an additional (next) day.&amp;nbsp; I have confirmed that there are severl facts records for data to support the added clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt; [DateType='Entry'], [Target Resolve Date Time]={"&amp;lt;=$(=max([Calendar Date])+1)"} &amp;gt;} [Case Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the max([Calendar Date]) returns 2/27/2015, (for the fact data that displays in the chart), BUT I my calendar selection list has "Feb-2015" selected, I wish to include 2/28/2015 in my set analysis.&amp;nbsp; If gets filtered out because there is no fact data on 2/28/2015.&amp;nbsp;&amp;nbsp; However I still expect to return a value greater than 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on what I may be doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 15:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-based-on-date-logic-not-working-as-coded/m-p/752793#M268258</guid>
      <dc:creator>dadumas</dc:creator>
      <dc:date>2015-03-05T15:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis based on date logic not working as coded</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-based-on-date-logic-not-working-as-coded/m-p/752794#M268259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got rid of the = in front of max() and it worked.&amp;nbsp; this below works:&lt;BR /&gt;sum({$&amp;lt; [DateType='Entry'], [Target Resolve Date Time]={"&amp;lt;=$(max([Calendar Date])+1)"} &amp;gt;} [Case Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had thought that expressions require the = in front of them when used in set analysis. I guess not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 16:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-based-on-date-logic-not-working-as-coded/m-p/752794#M268259</guid>
      <dc:creator>dadumas</dc:creator>
      <dc:date>2015-03-05T16:02:18Z</dc:date>
    </item>
  </channel>
</rss>

