Solved

Linking date dimension to date range in analysis services 2005

Posted on 2008-10-03
2
373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

635 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