﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Analysis Services  / Adding time dimension in the project / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 19:21:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Adding time dimension in the project</title><link>http://www.sqlservercentral.com/Forums/Topic1425657-17-1.aspx</link><description>Sounds OK. I would make the Calendar table a lot longer, like to 2050 or something. The table won't be very big even with 365/366 rows per year that's only about 13,000 rows.  Generally with a datawarehouse you are incrementally adding new data daily (or weekly or whatever) and if you get data after 2004 you won't have any way to link your fact table to your date (calendar) dimension. BTW, a table with dates is not really a time dimension, it's a date or calendar dimension. A separate time dimension would be useful if you are recording time of day, if you require that level of granularity.Another suggestion is to always use surrogate keys, even for calendar dimensions. I.e. don't use the date value as the key itself. Kimball has a good explanation of this [url=http://www.kimballgroup.com/wp-content/uploads/2012/05/DT5SurrogateKeys.pdf]here[/url]The basic reasons are that integer keys are quick and smart keys (with information encoded into the key) are generally a bad idea because it encourages them to be used in client applications and they lose their robustness. It also makes it awkward to have a calendar table that includes holidays for different geographical regions. You also get stuck if your source data has a bad date, it means you can do error handling so you have a way to link it to an "unknown" member of the date dimension.</description><pubDate>Mon, 04 Mar 2013 22:24:12 GMT</pubDate><dc:creator>davoscollective</dc:creator></item><item><title>Adding time dimension in the project</title><link>http://www.sqlservercentral.com/Forums/Topic1425657-17-1.aspx</link><description>I have two dimensionsContact and Sales and fact tablefact table contains following attributesOrderDate,TotalDue,TaxAmt,SubTotal,FreightMy Source table does not contain any Time table.I want to add Time dimension and want to aggregate the data on based on year,semister,quater wise etcI have done this using some tricks i am not sure whether i am correct or wrongWhat i did1. Right Click on Dimension2.Add New Dimension3.Selected 'Generate a time table in the  Data Source'4.Selected First calender day(Jan 1 2001) and Last Calender Day(31 Dec 2004) since Sales Table contains Orderdate starting from 2001 to 20045.Selected all the Time Periods6.Created Time Dimension7.Added this to existing data source view and made Date as Primary Key and linked to OrderDate attribute in Sales8.Done the same thing in the attribute relationship tabFor my happiness it worked very well and aggregation i am getting accordingly verified in the data base with SQL statementsSo my question is did i made the right relation ship with Salestable and whatever steps i followed is fine?Please let me know i am relatively new to SSAS. Any advice or suggestions are appreciated</description><pubDate>Fri, 01 Mar 2013 11:29:49 GMT</pubDate><dc:creator>Smash125</dc:creator></item></channel></rss>