Master the Date Dimension Like a Time Lord
-
Upload
steve-wake -
Category
Technology
-
view
5.092 -
download
0
description
Transcript of Master the Date Dimension Like a Time Lord
![Page 1: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/1.jpg)
Master the Date Dimension Like a Time LordSteve Wake
Sr. Business Intelligence Consultant
President, Denver SQL Server User Group
MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
![Page 2: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/2.jpg)
What is a Date Dimension?
• Dimension to track dates (usually by day)
• Can track multiple calendars (Julian, fiscal)
• Time should be in separate Dimension (if needed)
• One row per date/day
![Page 3: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/3.jpg)
What is a Time Dimension?
• Dimension to track time hours/minutes/seconds (depends on application)
• Keep time zones in mind
• Separate from Date Dimension for flexibility
• Only needs to cover 24 hours
![Page 4: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/4.jpg)
Why Date/Time Dimensions?
• Most reporting is done by date/time
• Track Holidays and other significant dates
• Do date calculations in SQL once
• Date/Time period comparisons
• Generate for years/decades easily
![Page 5: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/5.jpg)
Date/Time Dimension Types
• Calculated
• Tool Created
• Custom Physical
• Hybrid
![Page 6: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/6.jpg)
What to Include in the Date_DIM?
• Date as Integer for PK to make reload not break links (20130806)
• Date in multiple formats (“08/06/2013”, “Tuesday, August 6, 2013”, etc.)
• Multiple parts (Month, Day, Year, Month Text, Day Text, etc.)
• Holiday indicator (domestic/international/religious)
• Julian/Fiscal Calendars
• Calculated measures (Day # in week, Day # in month, Day # in year, Week # in month, Week # in year, etc.)
![Page 7: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/7.jpg)
Demo
• Date_DIM script
![Page 8: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/8.jpg)
Summary
• What & Why of Date/Time Dimensions
• Date Dimension Benefits
• What to Include in Date Dimension
• Doctor Who’s 50th Anniversary!
![Page 9: Master the Date Dimension Like a Time Lord](https://reader036.fdocuments.in/reader036/viewer/2022080209/54c7ce564a795989488b465a/html5/thumbnails/9.jpg)
ServicesSpeed development through training, and rapid development services from Pragmatic Works.
ProductsBI products to convert to a Microsoft BI platform and simplify development on the platform.
FoundationHelping those who do not have the means to get into information technology and to achieve their dreams.
See you soon…
My Email: [email protected] Blog: http://blog.wakebi.comMy Twitter: @stevewake