SQLBits 2018

DAX Best Practices

Best bractices in DAX formulas from real world experience.
As with any other language, you can write good DAX but you can also write bad DAX. Good DAX works fine, it is fast and reliable and can be updated easily. Bad DAX, on the other hand is… well, just bad.

In this session, we will show several DAX formulas, taken from our experience as consultants and teachers, analyzing (very briefly) the performances and looking for errors, or for different ways of writing them. As you will see, writing good DAX means following some simple rules and, of course, understanding well how evaluation contexts work!
The topics covered will be: naming convention, variables, error handling, ALL vs ALLEXCEPT, bidirectional filters, context transition in iterators, and FILTER vs. CALCULATE.