Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linking date dimension to date range in analysis services 2005

Posted on 2008-10-03
2
Medium Priority
?
380 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 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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...
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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…

670 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