From Ranking to Rolling Totals: Windowing Functions Explained
Proposed session for SQLBits 2026TL; DR
Learn how to use SQL Server windowing functions to create rankings, running totals, and rolling averages. This session makes complex queries simple and gives you practical skills you can use right away.
Session Details
If you write SELECT statements in SQL Server, windowing functions are a game changer. They make queries faster, cleaner, and far more powerful. In this session, we’ll break down the theory, show you the process visually, and demonstrate the output. From ROW_NUMBER and RANK to LEAD and LAG, you’ll learn how to add totals, sub-totals, variances, and rolling averages with ease. Whether you need running totals or comparisons to previous rows, you’ll leave knowing how to write windowing functions that make it happen.
3 things you'll get out of this session
A clear understanding of what windowing functions are and why they matter.
Practical techniques for using ROW_NUMBER, RANK, LEAD, LAG, and more.
The ability to create running totals, rolling averages, and comparisons with confidence.
Speakers
James McGillivray's other proposed sessions for 2026
5 Design Patterns for Better Looking Reports - 2026
Seconds to Save Lives: Real World Real-Time Intelligence with Fabric - 2026
Solving Real Business Challenges with DAX - 2026
Super Simple Fabric Workloads Make You Feel Precocious - 2026
The Force Awakens: Charting Your Career Path with the Data Community - 2026
Turning Data Into Stories People Remember - 2026
Understanding DAX Through Pictures - Part 1 - 2026
Understanding DAX Through Pictures - Part 2 - 2026
YMCA: You Must Consider Accessibility - 2026
James McGillivray's previous sessions
The Fundamentals of DAX Contexts
Explore the heart of DAX with this unique session, as I take you on an African Safari-themed adventure, where stunning wildlife photography serves as the backdrop for understanding the intricacies of DAX contexts. We'll encounter row and filter contexts, just like wild creatures in their natural habitat. Through captivating visuals, you'll uncover how these contexts shape DAX calculations and measure outcomes. Whether you're a data analyst or a business intelligence enthusiast, this session ensures a memorable and educational experience. Understanding DAX Contexts is your gateway to mastering DAX while enjoying the captivating beauty of African wildlife. Don't miss this opportunity to embark on your DAX adventure.
Fabric Power Hour
The famous Power BI Power Hour returns, but this time it has expanded to cover the whole of Fabric!
5 Things You Can Do to build better looking reports
Power BI Design is a lot like an art form, a mythical beast to many IT professionals. We’re generally inclined to think very analytically about our jobs, and creativity does not always come naturally. Thankfully, there are some patterns we can apply to design reports which are clean, uncluttered, and user friendly. Learn the science behind design, and a series of logical steps to follow to ensure that your reports always meet the mark.
The Fundamentals of DAX Contexts
Understanding how DAX determines evaluation context is a critical skill for a Power BI Developer. Writing anything other than the most simple measures requires this skill. In this session we'll explore Filter Context and Row Context individually, and how they combine to form Evaluation Context. We'll have a look at a number of simple measures and visualise how the context affects them.
"Whats in a Name?", Data Stories to Impress the Bard
Data on its own is useful, but boring. Data in story form makes people sit up and take notice. Learn to craft effective stories and maximise the impact of your data communication.
Power BI Report Design for the Aesthetically Challenged
Have you ever looked at other people's Power BI reports, and wondered how they look so good? Designing an aesthetically pleasing report does not require a graphic designer, just the lessons you'll take away from this session.