<?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 Dates in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/168884#M503811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the variable is not the problem... Date use in Set Analysis is very tricky. In order to compare dates in set analysis, you have to format the value EXACTLY the same way your Date Field it formatted - I mean, even the difference between 'M/D/YYYY' and 'MM/DD/YYYY' can break it.&lt;/P&gt;&lt;P&gt;If your Date Field "ObserverDate" is formatted as 'MM/DD/YYYY' (look it up in Document Properties, Number) - then format your variable value the same way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;date(varLookBackDate +(only (FacilityTimezoneOffset) / 24) - (varHours / 24), 'MM/DD/YYYY')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then it should work, provided that everything else is in order.&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Mar 2010 00:15:41 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2010-03-05T00:15:41Z</dc:date>
    <item>
      <title>Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/168883#M503810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to include a date parameter and an additional calculation within my existing set anlaysis expression. I had originally try to include it in a varilable but that was causing problems. My current expression using the variable is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;if(aggr(count({$ &amp;lt;ObserveDate = {"&amp;gt;=$(varDateParameter)"}, ChoiceCTCustomerDescription = &amp;gt;} ChoiceCTReferenceId) - count({$ &amp;lt;ObserveDate = {"&amp;gt;=$(varDateParameter)"}&amp;gt;} ChoiceCTReferenceId) &amp;lt;= 0, StaffRecnum), StaffName, null())&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;varDateParameter code is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;num(varLookBackDate +(only (FacilityTimezoneOffset) / 24) - (varHours / 24))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to figure out how to get the varDateParameter part of code into the set analysis expression without using a variable. Any help would be greatly appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 17:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/168883#M503810</guid>
      <dc:creator />
      <dc:date>2010-03-04T17:49:33Z</dc:date>
    </item>
    <item>
      <title>Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/168884#M503811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the variable is not the problem... Date use in Set Analysis is very tricky. In order to compare dates in set analysis, you have to format the value EXACTLY the same way your Date Field it formatted - I mean, even the difference between 'M/D/YYYY' and 'MM/DD/YYYY' can break it.&lt;/P&gt;&lt;P&gt;If your Date Field "ObserverDate" is formatted as 'MM/DD/YYYY' (look it up in Document Properties, Number) - then format your variable value the same way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;date(varLookBackDate +(only (FacilityTimezoneOffset) / 24) - (varHours / 24), 'MM/DD/YYYY')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then it should work, provided that everything else is in order.&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Mar 2010 00:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/168884#M503811</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-03-05T00:15:41Z</dc:date>
    </item>
  </channel>
</rss>

