<?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: Slowly changing dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353849#M492395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you're not wrong.&amp;nbsp; Look up incremental loads in this forum and use of IntervalMatch() to get your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2012 11:06:53 GMT</pubDate>
    <dc:creator>Jason_Michaelides</dc:creator>
    <dc:date>2012-07-17T11:06:53Z</dc:date>
    <item>
      <title>Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353844#M492390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;My goal is to be able to study how some fields have changed over the last year(for example).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I have two tables, DONOR and DONATION that are connected to each other via the key DONOR_ID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;In the table DONOR I have a field called 'QUARANTINE_STATUS' and in the field DONATION I have a field called 'DONATION_RESULT'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Lets say that the field 'QUARANTINE_STATUS' connected to a certain donor changed from 'OK' to 'PENDING_RESULTS' on&lt;/SPAN&gt; &lt;SPAN style="font-family: sans-serif;"&gt;24 July 2011. I want to be able to select a month and a year and then see a snapshot for the chosen time period. If i choose March 2011 then &lt;/SPAN&gt;'&lt;SPAN style="font-family: Arial, sans-serif;"&gt;QUARANTINE_STATUS'&lt;/SPAN&gt; for this donor would be 'OK' but if i choose September 2011 then it would show&amp;nbsp; &lt;SPAN style="font-family: Arial, sans-serif;"&gt;'PENDING_RESULTS'. The same applies for 'DONATION_RESULT' wich I also want to study in the same way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;In both tables there is a timestamp that updates every time something in that table changed.&lt;BR /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;Please help me write this script, since I am new to QlikView I have no idea on how to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #2a2a2a; font-family: 'Segoe UI', Tahoma, Verdana, Arial, sans-serif; text-align: -webkit-auto;"&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;Databyran&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 07:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353844#M492390</guid>
      <dc:creator />
      <dc:date>2012-07-17T07:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353845#M492391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should concatenate all tables that have a datestamp (i.e. can be considered transactions of a sort) into one table.&amp;nbsp; Then you will only have one date field which you can link to a master calendar of all dates and associated field (Month, Year, Week, Quarter etc). Separate the different Fact Types with a new field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'Donation'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FactType&lt;/P&gt;&lt;P&gt;FROM...Donations...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (Fact)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DonorFieldsThatChangeOverTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'Donor change'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FactType&lt;/P&gt;&lt;P&gt;FROM....Donors...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (Fact)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'Results'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FactType&lt;/P&gt;&lt;P&gt;FROM...Results...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (Fact)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'Appointment'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FactType&lt;/P&gt;&lt;P&gt;FROM...Appointment...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in the UI you can use Set Analysis if necessary to calculate whatever you want and all within the same date selections. Sometimes it won't be necessary E.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension = Date&lt;/P&gt;&lt;P&gt;Expression = Only(Quarantine_Status)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you what you're asking for above.&lt;/P&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;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 08:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353845#M492391</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-07-17T08:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353846#M492392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think databyron's problem is a bit more complicated, since he only have records for the points in time the status changed, not for all dates he is interested in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To handle this, there are some possible solutions, one standard would be to use the extended syntax of INTERVALMATCH LOAD prefix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;databyron, you first need to create a validfrom and validto timestamps / dates from your one change status date field.&lt;/P&gt;&lt;P&gt;You can do this by ordering your table by DonorID and Date desc and then use peek() function to retrieve the previous value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can link your time intervals to a master calendar using INTERVALMATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some examples here in the forum on how to do that (often in a samples related to currency exchange issues).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also some examples on how to do something very similar not using INTERVALMATCH, so you might want to investigate into this direction to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are even some possible solutions using only expressions in the frontend, but I personally would try to solve your problem in the script first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 09:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353846#M492392</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-17T09:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353847#M492393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading through it again you're absolutely right, Stefan.&amp;nbsp; To get a snapshot for any particular date IntervalMatch() would be necessary.&amp;nbsp; Thanks for the correction!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Databyron, the rest of my principal is still true.&amp;nbsp; Use IntervalMatch() to build your DonorChange temptable then concatenate it to the main Fact table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 09:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353847#M492393</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-07-17T09:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353848#M492394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Stefan, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I create my validfrom and validto timestamps?&lt;/P&gt;&lt;P&gt;I have another timestamp in the DONOR table called CREATE_TIMESTAMP that I could use the first time I load the data as a validfrom timestamp. But the next time I load and detect a change for a particular donor, I first want to set the validto for the old data to the current CHANGE_TIMSTAMP. The new data gets validfrom = CHANGE_TIMSTAMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that when a field changes in my sql-database the old data is overwritten so I need to keep track of changes in the qlikview-database and add a line there. Am I wrong when i say that I need to use both qwd-files and the intervalmatch function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a little troubled wheter QlikView is a good tool to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Databyran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 10:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353848#M492394</guid>
      <dc:creator />
      <dc:date>2012-07-17T10:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353849#M492395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you're not wrong.&amp;nbsp; Look up incremental loads in this forum and use of IntervalMatch() to get your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 11:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353849#M492395</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-07-17T11:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353850#M492396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jason.&lt;/P&gt;&lt;P&gt;I have already checked incremental load and a managed to perform incremental load but the problem is that I dont see how I should use intervalmatch togheter with the incremental load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unsure how to add a line to the qvd-file instead of just overwriting the old data.&lt;/P&gt;&lt;P&gt;can you please explain how to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;store just the table DONOR in an qvd and check if QUARANTINE_STATUS changed, if QUARANTINE_STATUS changed I want to add a line to this DONOR_ID and then update the qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very thankful for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Databyran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 11:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353850#M492396</guid>
      <dc:creator />
      <dc:date>2012-07-17T11:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353851#M492397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;databyron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there are some different topics you need to handle and we should try not mixing them up, some of the topics are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Link dates from multiple tables to a common master calendar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Jason said you can concatenate the tables, creating one date field and a type field and link this single date field to the master calendar. Using a linkage table is a quite similar approach, so I would search the forum for linkage table, master calendar, multiple date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If you need to handle matching dates (from the master calendar) to time intervals (from the fact table, instead of dates), you might want to look into IntervalMatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might help you in creating a start and end date field (status valid from / valid to) from your one date field:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/169873#169873" title="http://community.qlik.com/message/169873#169873"&gt;http://community.qlik.com/message/169873#169873&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As said, there are a lot of examples here in the forum covering INTERVALMATCH, search for INTERVALMATCH or currency exchange rate etc. Then you find something like&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading active_link" href="https://community.qlik.com/message/93746#93746" title="http://community.qlik.com/message/93746#93746"&gt;http://community.qlik.com/message/93746#93746&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Incremental load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest that you have a look into the nice example in Rob Wunderlich's QV cookboook, the steps to reproduce are quite well explained.&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://robwunderlich.com/downloads/" title="http://robwunderlich.com/downloads/"&gt;http://robwunderlich.com/downloads/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 12:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-changing-dimension/m-p/353851#M492397</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-17T12:29:31Z</dc:date>
    </item>
  </channel>
</rss>

