<?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: Date set comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318154#M1185247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this as the background color expression.&amp;nbsp; Change the two colors as desired. See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pick(1+min(aggr(fabs(Date-Holiday),Holiday,Date)),lightred(),rgb(255,150,150))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would probably help performance to flag these dates in the script.&amp;nbsp; It sounded like you wanted an expression, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 01:00:52 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-11-15T01:00:52Z</dc:date>
    <item>
      <title>Date set comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318152#M1185245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;I have a field called DaysWorked containing a list of about 400 dates.&lt;/P&gt;&lt;P class="p1"&gt;I also have a table containing the list of national holidays (HolidayDate), containing about 8 dates.&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;I wish display the list of DaysWorked, which will be bright red if the date lands on a national holiday. Essentially, if DaysWorked is in HolidayDate, then true. I am having difficulty getting the hang of set arithmetic.&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;As an extra challenge, Id like DaysWorked to be a duller shade of red if it is +/- 1 day either side of a national holiday. &lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Im new to QV and BI generally. I would appreciate any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 19:04:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318152#M1185245</guid>
      <dc:creator />
      <dc:date>2011-11-14T19:04:41Z</dc:date>
    </item>
    <item>
      <title>Date set comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318153#M1185246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the table of holidays is linked with the table containing days worked, then this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(date(DaysWorked)=date(HolidayDate), Red(), if(date(DaysWorked-1)=date(HolidayDate) or date(DaysWorked+1)=date(HolidayDate),Lightred())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 19:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318153#M1185246</guid>
      <dc:creator />
      <dc:date>2011-11-14T19:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date set comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318154#M1185247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this as the background color expression.&amp;nbsp; Change the two colors as desired. See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pick(1+min(aggr(fabs(Date-Holiday),Holiday,Date)),lightred(),rgb(255,150,150))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would probably help performance to flag these dates in the script.&amp;nbsp; It sounded like you wanted an expression, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 01:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-set-comparison/m-p/318154#M1185247</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-15T01:00:52Z</dc:date>
    </item>
  </channel>
</rss>

