Optimizing IF conditions by using variables
In a previous article we showed the importance of using variables to replace multiple instances of the same measure in a DAX expression. A very common use case is that of the IF function. This article focuses on the cost for the formula engine rather than for the storage engine.
Consider the following measure.