I had a question about how to do Slowly changing dimensions in PowerPivot yesterday on my ask a questions page and decided to share two excellent solutions. First a quick refresher on what actually is a slowly changing dimension ? It probably is something we all came across one time or another but didn’t recognize it as such. Wikipedia gives a pretty good description:
Dimension is a term in data management and data warehousing that refers to logical groupings of data such as geographical location, customer information, or product information. Slowly Changing Dimensions (SCDs) are dimensions that have data that changes slowly, rather than changing on a time-based, regular schedule.
For example, you may have a dimension in your database that tracks the sales records of your company’s salespeople. Creating sales reports seems simple enough, until a salesperson is transferred from one regional office to another. How do you record such a change in your sales dimension?
You could sum or average the sales by salesperson, but if you use that to compare the performance of salesmen, that might give misleading information. If the salesperson that was transferred used to work in a hot market where sales were easy, and now works in a market where sales are infrequent, her totals will look much stronger than the other salespeople in her new region, even if they are just as good. Or you could create a second salesperson record and treat the transferred person as a new sales person, but that creates problems also.
There is more to it like different types and such which you can read all about in PowerPivot. I could make and example myself but there are two sources that already did it for me, one is Marco Russo and Alberto Ferrari’s book PowerPivot for Excel 2010: Give Your Data Meaning (chapter 7) or see this other solution on this blog post: http://bennyaustin.wordpress.com/2010/08/08/powerpivot-dax-expression-for-type-2-scd-lookup/
So as you can see it is possible using PowerPivot, but you need a proficient amount of knowledge of DAX to pull it off.
Hi Kasper, just one remark about the name of one of the Powerpivot book author you talk about in this blog, it’s Marco Russo (and not Russen) maybe just a typo.