Average of best 8 scores from last 20 rounds
So the requirement is to find the average of the best 8 scores from the last 20 rounds of golf for each player. So if you think about that problem, there are quite a few layers to it – perfect for a blog on how to break a problem into pieces so you can solve it in DAX.
Even if you do nothing with DAX, read over the post because the problem-solving technique Allington uses is generally applicable.
As you can see, using DAX variables is a much better solution than using the aliases…the performance improvement is about the same, however, variables we can wrapped up in the calculated measures inside the model allowing us to take advantage of the performance gain with all tools (not just those allowing us to hand-craft the DAX queries).
The query used in this post is too simple to highlight the performance benefit (small data dataset, simple calculation)…but it did make it easier to cruise the query plans and SE requests. In reality, a better use case for highlighting the performance benefits of these optimizations is with a query that hammers the Formula Engine (FE).
Interesting stuff, even for someone with no knowledge of DAX.