<?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 Open ended periods VS Calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848463#M657071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm fairly new to Qlik, and I'm working on designing my data model. I've been trying to set up a model where I have a period and I'm linking this period to a master calendar table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I tried doing this with periods with an end date, it worked fine. However when I included open ended periods in my data set, I came across an issue. My code for creating the bridge table between the Transfers table (trans) and the Master Calendar table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ============ Create the Transfers_Calendar ============&lt;/P&gt;&lt;P&gt;Trans_Calendar:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM_DATE as Trans_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(FROM_DATE) as Trans_MONTH;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MinDate+iterno()) as FROM_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; While iterno() &amp;lt;= MaxDate - MinDate ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(FROM_DATE)-1 as MinDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(TO_DATE) as MaxDate&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TRANS&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;// ============ Create the bridge table between the Transfers and the Transfers_Calendar ============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trans_x_Dates:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRANS_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left(Date( FROM_DATE + IterNo() - 1 ),10) as Trans_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident TRANS&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= TO_DATE - FROM_DATE + 1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's pretty obvious that it wont create a link when the end date is a null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried looking into a solution where I create a fictional end date (like 2099-12-31), but that increases the size of my data by a very large factor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most common scenario for me, as I use the periods to show changes in a 'Status' of a client (Active, Inactive, Frozen) and most of the periods don't have an end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to ask what is the best practice for handling open periods?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks beforehand &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2015 13:47:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-08T13:47:36Z</dc:date>
    <item>
      <title>Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848463#M657071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm fairly new to Qlik, and I'm working on designing my data model. I've been trying to set up a model where I have a period and I'm linking this period to a master calendar table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I tried doing this with periods with an end date, it worked fine. However when I included open ended periods in my data set, I came across an issue. My code for creating the bridge table between the Transfers table (trans) and the Master Calendar table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ============ Create the Transfers_Calendar ============&lt;/P&gt;&lt;P&gt;Trans_Calendar:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM_DATE as Trans_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(FROM_DATE) as Trans_MONTH;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MinDate+iterno()) as FROM_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; While iterno() &amp;lt;= MaxDate - MinDate ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(FROM_DATE)-1 as MinDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(TO_DATE) as MaxDate&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TRANS&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;// ============ Create the bridge table between the Transfers and the Transfers_Calendar ============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trans_x_Dates:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRANS_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left(Date( FROM_DATE + IterNo() - 1 ),10) as Trans_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident TRANS&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= TO_DATE - FROM_DATE + 1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's pretty obvious that it wont create a link when the end date is a null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried looking into a solution where I create a fictional end date (like 2099-12-31), but that increases the size of my data by a very large factor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most common scenario for me, as I use the periods to show changes in a 'Status' of a client (Active, Inactive, Frozen) and most of the periods don't have an end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to ask what is the best practice for handling open periods?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks beforehand &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 13:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848463#M657071</guid>
      <dc:creator />
      <dc:date>2015-06-08T13:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848464#M657072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand what do you want to do with the bridge-table. Normally it wouldn't be needed to link a fact-table to a master-calendar. For many different date-fields you could use these approach: &lt;A href="https://community.qlik.com/qlik-blogpost/3585"&gt;Canonical Date&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 17:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848464#M657072</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-08T17:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848465#M657073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data model contains a slowly changing dimension called "Transfers". It shows the periods where a member belongs to a certain "Home Club" (Numerical value). It's a table with: From_Date, To_Date , Person_ID, Home_Club_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to do is to be able to choose a point in time (a day), and be able to count how many people are listed at each "Home Club" at that point in time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used code from the post by HIC in :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2940"&gt;Creating Reference Dates for Intervals&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In order to be able to link each day to the appropriate periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the correct approach to what I'm trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 07:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848465#M657073</guid>
      <dc:creator />
      <dc:date>2015-06-09T07:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848466#M657074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think these links fit better in your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3037"&gt;IntervalMatch&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4310"&gt;IntervalMatch and Slowly Changing Dimensions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 07:22:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848466#M657074</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-09T07:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848467#M657075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that is the correct article and approach. To handle the open ended dates, I assume that you mean that TO_DATE would be null. You could try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= &lt;STRONG&gt;Alt(&lt;/STRONG&gt;TO_DATE - FROM_DATE + 1 , &lt;STRONG&gt;90&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a value that makes sense in your data set, or else try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= &lt;STRONG&gt;Alt&lt;/STRONG&gt;(TO_DATE, &lt;STRONG&gt;Today()&lt;/STRONG&gt;) - FROM_DATE + 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to use today's date as the 'fill-in' for null TO_DATEs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 07:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848467#M657075</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-06-09T07:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Open ended periods VS Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848468#M657076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about taking a value which is relative to 'Today' as the end date (E.g today + 5 years), but I was concerned about the efficiency of having to update all (or most of) my periods every day. I was hoping to have a setup where I only import new data and 'Changes' to existing entries, instead of reloading my whole data set on a daily basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;I was thinking this is a strange way to approach this. Eventually I will end up with a table that has an entry for each 'person' and each day since he started. So basically the size is based on people multiplied by days. When I have 2 million people over a period of 10 years, it sounds like a whole lot of data, that should be optimized somehow.&lt;/P&gt;&lt;P&gt;I know that Qlik has some good methods to normalize and compact data. Do you know how feasible it is to work with a data set like that? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 08:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-ended-periods-VS-Calendar/m-p/848468#M657076</guid>
      <dc:creator />
      <dc:date>2015-06-09T08:34:29Z</dc:date>
    </item>
  </channel>
</rss>

