Download presentation
Presentation is loading. Please wait.
1
Date Dimension: One Script for All
Steve Wake DW/BI Engineer III, National CineMedia Chapter Leader, Mile Hi Power BI User Group
2
What is a Date Dimension?
Dimension to track dates (usually by day) Can track multiple calendars (Gregorian, Julian, Fiscal) Time should be in separate Dimension (if needed) One row per date/day 2 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
3
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 3 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
4
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 4 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
5
Date/Time Dimension Types
Calculated Tool Created Custom Physical Hybrid 5 | 2/11/2017 SQLSaturday #358 – Albuquerque 2015
6
What to Include in the Date_DIM?
Date as Integer for PK to make reload not break links ( ) Date in multiple formats (“02/11/2017”, “Saturday, February 11, 2017”, etc.) Multiple parts (Month, Day, Year, Month Text, Day Text, etc.) Holiday indicator (domestic/international/religious) Gregorian/Julian/Fiscal Calendars Calculated measures (Day # in week, Day # in month, Day # in year, Week # in month, Week # in year, etc.) 6 | 2/11/2017 SQLSaturday #358 – Albuquerque 2015
7
Demo dimDate script dimTime script 7 | 2/11/2017
7 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
8
Summary What & Why of Date/Time Dimensions Date Dimension Benefits
What to Include in Date Dimension What to Include in Time Dimension 8 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
9
Contact swake@ncm.com @stevewake on Twitter LinkedIn, Google+
Blog – Mile Hi Power BI – 9 | 2/11/2017 SQLSaturday #596 – Denver BI Edition 2017
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.