<?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: Adding hard coded date field (range) to an existing table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984477#M335949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the detailed response. I believe my requirement is simpler than this. I just need to "synthetically" create a new field that I can then filter on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datasource1:&lt;/P&gt;&lt;P&gt;Many existing fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new field = Compensation Periods&lt;/P&gt;&lt;P&gt;Values: as originally supplied (i.e a range of dates, such as, 1/2/15 - 5/29/15)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the date ranges do NOT specifically match any existing dates in the data model.&lt;/P&gt;&lt;P&gt;Any additional thoughts would be much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 18:03:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-11-12T18:03:32Z</dc:date>
    <item>
      <title>Adding hard coded date field (range) to an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984475#M335947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I searched but couldn't find this example. I need to add a new field to an existing table that is simply a date range -- specifically, I need to add the ability to filter on "Compensation Period" ranges. I added a small dataset below. I just want to inject this field into an already existing table. Best suggestion to do this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field = Compensation Period&lt;/P&gt;&lt;P&gt;Ex. values (note: these values are defined values):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/2/14 - 5/30/14&lt;/P&gt;&lt;P&gt;5/31/14 - 12/31/14&lt;/P&gt;&lt;P&gt;1/1/15 - 5/28/15&lt;/P&gt;&lt;P&gt;5/29/15 - 12/30/15&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984475#M335947</guid>
      <dc:creator />
      <dc:date>2015-11-12T14:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding hard coded date field (range) to an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984476#M335948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;The below is based on my understanding. If you have the date field in your existing field, you can try to create the newfield using IntervalMatch. Like&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14473412926661741 jive_text_macro" jivemacro_uid="_14473412926661741"&gt;
&lt;P&gt;Compensation:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Start,End&lt;/P&gt;
&lt;P&gt;1/2/14,5/30/14&lt;/P&gt;
&lt;P&gt;5/31/14,12/31/14&lt;/P&gt;
&lt;P&gt;1/1/15,5/28/15&lt;/P&gt;
&lt;P&gt;5/29/15,12/30/15&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;Date_Table:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Date&lt;/P&gt;
&lt;P&gt;6/12/14,&lt;/P&gt;
&lt;P&gt;12/31/14&lt;/P&gt;
&lt;P&gt;1/11/15,&lt;/P&gt;
&lt;P&gt;5/10/15&lt;/P&gt;
&lt;P&gt;5/29/15&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;T1:&lt;/P&gt;
&lt;P&gt;IntervalMatch (Date) LOAD Start,End Resident Compensation;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;New:&lt;/P&gt;
&lt;P&gt;LOAD *,Start&amp;amp;' - '&amp;amp;End&amp;nbsp; as Compensation_Period Resident T1;&lt;/P&gt;
&lt;P&gt;DROP Table Compensation,Date_Table,T1;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105287_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Let us know, if this not your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 15:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984476#M335948</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-11-12T15:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Adding hard coded date field (range) to an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984477#M335949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the detailed response. I believe my requirement is simpler than this. I just need to "synthetically" create a new field that I can then filter on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datasource1:&lt;/P&gt;&lt;P&gt;Many existing fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new field = Compensation Periods&lt;/P&gt;&lt;P&gt;Values: as originally supplied (i.e a range of dates, such as, 1/2/15 - 5/29/15)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the date ranges do NOT specifically match any existing dates in the data model.&lt;/P&gt;&lt;P&gt;Any additional thoughts would be much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 18:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984477#M335949</guid>
      <dc:creator />
      <dc:date>2015-11-12T18:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding hard coded date field (range) to an existing table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984478#M335950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one solution to implement your specified requirements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_191250_Pic2.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105552_QlikCommunity_Thread_191250_Pic2.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_191250_Pic1.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/105553_QlikCommunity_Thread_191250_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14476275952387150 jive_text_macro" jivemacro_uid="_14476275952387150"&gt;
&lt;P&gt;Datasource1:&lt;/P&gt;
&lt;P&gt;LOAD Rand() as field1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rand() as field2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rand() as fieldn&lt;/P&gt;
&lt;P&gt;AutoGenerate 10;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Join&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;Compensation Period&lt;/P&gt;
&lt;P&gt;1/2/14 - 5/30/14&lt;/P&gt;
&lt;P&gt;5/31/14 - 12/31/14&lt;/P&gt;
&lt;P&gt;1/1/15 - 5/28/15&lt;/P&gt;
&lt;P&gt;5/29/15 - 12/30/15&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 22:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-hard-coded-date-field-range-to-an-existing-table/m-p/984478#M335950</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-11-15T22:46:47Z</dc:date>
    </item>
  </channel>
</rss>

