Abstract
A common reporting requirement is to produce totals by different ranges of time for comparison. Typical reports contain totals by month, quarter, and year, sometimes with comparisons to the same period in the prior year or for month-to-date or year-to-date totals. Products like SQL Server Analysis Services and PowerPivot provide functions to navigate date hierarchies. With window functions in SQL Server 2012 or later, you can produce the same calculations using the techniques provided earlier in this book.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Kathi Kellenberger with Clayton Groom
About this chapter
Cite this chapter
Kellenberger, K., Groom, C. (2015). Time Range Calculations and Trends. In: Expert T-SQL Window Functions in SQL Server. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1103-8_9
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1103-8_9
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1104-5
Online ISBN: 978-1-4842-1103-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books