QlikConnect posted on August 26, 2010 10:33
Hi Everyone,
In this article we will provide you with an example on how to create slowly changing dimensions in QlikView and preserve the history of the current release of your dimension. Even if you do not want to partition the history of a fact table you still could implement slowly changing dimensions (SCD) type 2 and only select the current valid occurrence of a dimension.
The attached example QlikView application is preserving the history of a customer dimension. You should extract the zip and adjust the settings of the variable vDataInput & vDataOutput on the main tab, in the script editor, to the location that you have extracted the files to.
Steps to run and simulate this script:
- Set date to yesterday;
- Execute the script;
- Change date back to today;
- Adjust the variable vSCDDay to 2;
- Execute script;
- Take a look at the table box on the "Slowly Changing Dimension Tab".
Looking at the table box should show you show multiple occurrences for customers 10009 and 10013 and that for each customer there is only one record with a value of 1 in the field of MostRecent.
Take a look at the comments throughout the script to determine what the different steps try to accomplish. If you have any question and/or comments please let us know.
Kind regards,
The QlikConnect team.