Solved

Linking date dimension to date range in analysis services 2005

Posted on 2008-10-03
2
329 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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Creating and Managing Databases with phpMyAdmin in cPanel.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now