Link to home
Start Free TrialLog in
Avatar of bminetwork2277
bminetwork2277

asked on

Dynamic Time Dimension

I have an SQL Server Analysis Services (SSIS) Project that contains an order measure group and a project dimension.  The project has a field that contains the start of the project.  When I analyze measures in the order measure group along a time dimension I want a breakdown by week but have my weeks start date be the start date of the project.  

For example If you analyze the measure by week, all orders in project 1 that have an order date within one week of the project start date would be totaled in week 1.  All orders in project 2 that have an order date within one week of project 2's start date would be listed under week 1 as well.  This could result in totals from the order measure group that are years apart being totaled in the same week.

I hope that's a clear enough explanation.
Avatar of PedroCGD
PedroCGD
Flag of Portugal image

you have the week attribute in your time dimension, correct?
Do you have created the hiearchy with date < week < month < quarter < year?
regards
Avatar of bminetwork2277
bminetwork2277

ASKER

Yes I have a week attribute and it is part of a hierarchy.  But the time dimension is linked by a static date.  But that doesn't fix my problem.  Let me try an example.

Order 1 has a project start date of 01/01/08 and a received date of 01/08/08
Order 2 has a project start date of 01/08/08 and a received date of 01/08/08

Because order 1's received date is a week after it's start date I need it to be listed in week 2 because it was received in the second week of the project.  Order 2's received date is the same as it's start date so it was received in the first week of the project.  

Even though they both have the same received date they need to be displayed in different weeks.  The week they are placed in is a relative value that needs to be re-evaluated on each record.  There is no way I'm aware of to do this with a standard time dimension because when you link two records to time on the same date, you will always receive the same week back.
Do you have a Foreign key in your fact to your time dimension, correct?

1. Do you tried to create a this FactTable as a view/namedquery with the right foreign key to time dimension?
2. Do you tried to have 2 foreign keys... one for start date and other for receive date?

regards
1.  The fact table (Orders) has a foreign Key field (Received Date) to the time dimension.
2.  That would allow me to group the records by either the start date or the received date, but not the difference between the two.
If you want the difference between the two, create a calculated member.
Regards
ASKER CERTIFIED SOLUTION
Avatar of bminetwork2277
bminetwork2277

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial