The history of “reinventing the bicycle” using DAX
Defining evaluation context and context transition rules is the most important and confusing part of DAX. Sometimes when you think you’ve already managed it, DAX turns to you with other side, hook, uppercut – and you’re knocked down.
Last week one of my Facebook friends asked me to explain why his measures working this way and not that way. It was quite easy questions and there is no sense to place them here. But my friend is a very curious man, one question led to another, and suddenly I found that I can’t explain a very simple, on the first look, concept. The question was about filtering under context transition in calculated column (here you can imagine a very big grin on DAX’s face).
For this post I reworked and simplified data model.
There are two tables, named ‘Managers’ and ‘Sales’ . ‘Managers’ has only two columns: [Manager] and [Department] .
‘Sales’ has a little bit more columns (although it doesn’t matter here): [Order] , [Manager] , [Amount] and [Order type] .
As you can see, they are linked one-to-many by [Manager] column. Quite easy.
First of all my friend asked me, how context transition works. “Hey, it’s easy!” – I said, and Continue Reading →