Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linking date dimension to date range in analysis services 2005

Posted on 2008-10-03
2
Medium Priority
?
382 Views
Last Modified: 2013-11-16
I have a table describing accounts of a company.  It looks like this:
ID      Account_id      Active            Record_start_date      Record_end_date
1      1            false            01/01/2007            10/01/2007
2      1            true            11/01/2007            31/12/2007
3      1            false            01/01/2008            null
4      2            false            01/01/2007            31/01/2007
5      2            true            01/02/2007            31/09/2007
6      2            false            01/10/2007            null

Is it possible to connect this to a date dimension, so that i can get number of accounts, and number of active accounts
for a given date/date-period ?

I have been solving this by making a fact table containing one record per account per day, stating weather or not it was active or not,
and then doing a making a distinctcount measure on account_id, but this takes a lot of time to make, and also a lot of time to process,
so i thought that perhaps a more clever solution existed.   I have searched the web for a few days now, without finding the solution to this,
so i thought i would try you guys.

Thanks in advance.

/ David Bojsen
0
Comment
Question by:DavidBojsen
2 Comments
 
LVL 8

Accepted Solution

by:
srnar earned 1500 total points
ID: 22641815
We are solving this with a special fact table e.g. F_AccountValidity where you have each account and a range. There is important to say that the fact table can be huge (often needs partitions) - if you have 1 mio of account and granularity of a range is a month so you have 12 mio of record per year (in case of daily granularity you will get 365 mio of records). Like a measure use only value 1 for sum or record count.

When using in MDX your account is active only when the sum or count is grater then 0 for specified set of days/months.
0
 

Author Closing Comment

by:DavidBojsen
ID: 31502684
Hello srnar

Thanks for your comment.  Actually this is what i am already doing, as i tried to explain in the question.
I was just hoping that someone had a better solution.

Best Regards
David
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question