Newbie question regarding relative dates -
12-10-2005
, 12:43 PM
I'm absolutely new to Analysis Services and wanted to pose this question
hoping that an expert could look it over and point me in the right direction
if I am doing the wrong thing.
I have a fact table which holds a statistical value 'Score' at the year
level. I need to be able to diplay scores for each year and also a year to
date
score. I've read the excellent article by William Pearson on relative dates
http://databasejournal.com/features/...0894_3518771_5
and I was going to go about this by creating a table that defines year
like so
Year_ID Year_Value
1 2002
2 2003
3 2004
4 2005 Year to Date
and then from fact table create a view for each year (adding Year_ID field
or joining to Year definition table)
vw_Fact_Year1 select * from Fact where Year_ID = 1
vw_Fact_Year2 select * from Fact where Year_ID = 2
vw_Fact_Year3 select * from Fact where Year_ID = 3
vw_Fact_YTD select * from Fact where Year_ID = 4
and finally the in Analysis Services create measures for Score based on Fact
year views...
Year
2002 2003 2004 2005
Score Year1 Score Year 2 Score Year 3 Score YTD
52 53 66 80
Is this generally the right way to go? |