22-25 April 2026
Video unavailable
SQLBits 2025

Simplify your DAX with window functions

In this session I'll introduce you to window functions in DAX. You will learn to understand their syntax and potential to simplify previously lengthy and complex code over a number of real-life use-cases in the live demo part of the session.
Window functions are a relatively new addition to DAX. They aim to simplify certain data operations that are very intuitive in tools like Excel, but weren't so easy to replicate in DAX so far.

In this session I'll introduce you to the 3 main window functions: INDEX, OFFSET and WINDOW. Even though their syntax may seem a bit complex at first glance, I'll show you that using them is not a rocket science. You will learn a number of real-life use-cases and code patterns that you can start using in your own Power BI reports from the very next day. Based on these use-cases, you will see the potential of window functions to not only simplify a previously lengthy DAX code but also optimize it in terms of performance. I will also introduce you to some 'false friends' of window functions - cases where it might actually not be the best idea to use them.

Selected use cases which you will learn include: time intelligence, running totals, cumulative calculations, Pareto charts and Excel-style calculations (e.g. delta compared to last item).

It would be great if prior to attending this session you have a general understanding of DAX and its key concepts.